Thank you for the long explanation. I understood the One to Many product/skus relationship. I still have these questions and comments just for your reference:
1. Should a sku have a default product or any sku should have a specific product associated with, and
2. should some of the Sku's properties be moved to Product including name, description, active start/end dates, taxCode (in product in 3.0.6, but moved to sku in 3.1.0), and all other Product's properties that are stored in default Sku. These are the same across all Skus of a product. Here are my rationales:
1) Conceptually they belong to Product. The reason we need Sku module is just like you said a product may have variations and Sku module is used to represent such variations, but Sku should not be used to store the shared properties.
2)Storing shared properties in sku doesn't improve implementation. For instance, accessing such shared properties at either Sku or Product must go through product's default Sku indirectly.
3) From schema design point of view, Sku table's many columns will always be null and only those product's default Sku may have non-null values if a product is associated with many skus.
4) Product has default Sku and Sku has default Product creates unnecessary references and more db joins.
So my proposal is a Product may have 1 or more Skus and a Sku can only be associated with 1 Product. Does this make sense?
As for the 61-table join exception, I haven't configured any catalog. The only thing I did is extend Product and Sku to add merchant to them. It works perfectly with 2.0.1, but it runs into this issue when link to 3.1.0. If this is due to multi-table inheritance, that may indicate the query on BLC tables may be close to the max number of joined tables.
I prefer multi-table inheritance so all BLC tables are kept unchanged. This may be easier for future migration. But I may try single-table inheritance.
Thank you very much!
-Charlie
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.