A.Miguel, on 08 November 2011 - 07:25 AM, said:
Congratulations; this looks to be an amazing extension. I am a newbie on Yii so that I am still struggling on it.
I have a few questions to ask you about giix. Let’s assume we have the following scenario:
tbl_order - id - order_desc tbl_products - id - product_desc tbl_order_products - id - id order_id - product_id - quantity
One Order has many Products and one Product can belong to multiple Orders.
Questions
---------------------------------------------------------------------------------------------------
1: When should I use GiixModel Generator instead of normal Model Generator?
2: Is the order from which the models are generated relevant?
3: Is it supposed for Giix to generate proper MANY_MANY relation and set the correct pivot table on pivotModels method?
// Order model 'products' => array(self::MANY_MANY,Products , ‘tbl_order_products(order_id, product_id)'),
I did some tests here and ended on changing the relations manually.
4: For the scenario presented above the Giix extension would apply as well? If you noticed there is an extra field in tbl_order_products where user can set the product quantity for a specific order. Will the saveWithRelated work fine with multiple fields?
A tutorial would be a very good complement to this great extension. I believe there are several other features that we would appreciate on this extension.
Thanks a lot,
A.Miguel
Does anyone suggested a solution step by step how to manage this situation? I didn't find any..

Help


















