Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
one more thing here, how can I save this additional data into the relation table? On 4 июл, 12:14, XuMiX [EMAIL PROTECTED] wrote: thx, i'll have a try On 2 июл, 23:23, James K [EMAIL PROTECTED] wrote: CakePHP has no problem reading extra fields in your join table. As long as you're

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
and one more thing according to this code in model.php if (!empty($newValues)) { $fields = join(',', array( $db-name($this-hasAndBelongsToMany[$assoc]['foreignKey']),

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread duRqoo
Hey XuMiX, with cake u are able to save meta data within join table, but it's somehow a tricky part. I suggest you to read (http://cricava.com/blogs/ index.php? blog=6title=modelizing_habtm_join_tables_in_cakephp_more=1c=1tb=1pb=1) to get the point. First of all when saving habtm related data

Re: HABTM Relations and additional info in the rlation table

2008-07-11 Thread XuMiX
thanks a lot! this was the most helpful and friendly post i've ever recieved :) BTW: the thing i needed is only: array( 0 = array( person_id = XYZ, year = 123541, amount = 123123 ), 1 = array( person_id =

Re: HABTM Relations and additional info in the rlation table

2008-07-03 Thread XuMiX
thx, i'll have a try On 2 июл, 23:23, James K [EMAIL PROTECTED] wrote: CakePHP has no problem reading extra fields in your join table. As long as you're naming your join table correctly and have a hasAndBelongsToMany relationship to the model on the other side of the join table, it'll pull

HABTM Relations and additional info in the rlation table

2008-07-02 Thread XuMiX
i have a habtm relation, persons, groups, and a relation table groups_persons i need to add some more info into the relation table, for instance year of presence, role, etc. how do i get that info within cake ? Or how do i organize my tables and models?