Many-to-Many question
- Single Page
Posted 01 March 2013 - 03:34 AM
Posted 03 March 2013 - 10:49 AM
Within your set_relation_n_n function call use just that "{name} {description}".
Posted 05 March 2013 - 01:43 AM
Posted 05 March 2013 - 09:42 AM
Ooo ok! Now I get it! Sorry.
I thought I had a solution but it was wrong.
Let me think of it...
Posted 05 March 2013 - 10:11 AM
Can you print out your controller's code?
I don't fully understand how you implement this system.
For example, your product table has the id,price.
How do you insert the name/description of a specific product?
To be honest with you I would have changed your product table a little bit but this would help me a lot with the design.
table product
id,name,description,price
(name, description here use a default let's say english name/description)
but by doing this then I could use a simple set_relation to show up the multilingual name/description from the product_lang table!
What do you think about this?
In essence what you have here is a Master(product) / Detail (product_lang) structure and this is not yet supported by GC library.
But you could achieve the same functionality like this.
REMEMBER you need to callback_before_insert / callback_before_update in order to update both the product table and the product_lang table!