Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread jakecake (newbie)
> But maybe I should go the way you described. It's a little bit > frustrating as a beginner to spent hours on a tiny step :-) Did you check this? Bug in cake beta 1.2 model : http://groups.google.com/group/cake-php/browse_thread/thread/2ad48c4e10f58fc0/c7c4511051071b52 --~--~-~--~~

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread [EMAIL PROTECTED]
When I had to implement this functionality I did what Tulio suggested. I believe that the with associations sole purpose is so that you don't have to do this though. I haven't tried playing around with it, but have you tried this yet: Before you save your post data try adding a taggedpost field t

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread su6z3r0
Tulio, thank you for your reply. I guess your are proposing something which is explained here: http://www.thinkingphp.org/2006/10/26/modeling-relationships-in-cakephp-faking-rails-throughassociation/ However, my understanding was that it should now (cake 1.2) with HABTM and "with" associations.

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread Tulio Faria
For example, a model: GuessLocation that belongsTo: Guess and Location, and Guess and Location hasMany: GuessLocation. On 30 jan, 14:14, Tulio Faria <[EMAIL PROTECTED]> wrote: > I'd create a class between others, like a "join class". > > On 30 jan, 12:35, su6z3r0 <[EMAIL PROTECTED]> wrote: > > >

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread Tulio Faria
I'd create a class between others, like a "join class". On 30 jan, 12:35, su6z3r0 <[EMAIL PROTECTED]> wrote: > Here is what I am trying so far. > > http://bin.cakephp.org/view/1751195932 > > But this example only shows how to save the foreign keys in the HABTM > table. But I have not found out ye

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread su6z3r0
Here is what I am trying so far. http://bin.cakephp.org/view/1751195932 But this example only shows how to save the foreign keys in the HABTM table. But I have not found out yet how to populate additional fields. Any ideas? --~--~-~--~~~---~--~~ You received thi

Saving additional fields in HABTM tables ("With" Associations)

2008-01-29 Thread su6z3r0
Hello, I saw the example in the PDF (http://www.cakephp.org/files/OCPHP.pdf) but I don't get how the "date" field of the posts_tags table is populated. Also it is not quite clear to me what the beforeSave() method in this example does. Would you still use $this->data['Tag']['Tag'] = array($thi