David I have one more question. when you said that is "The PK in this model", it is really the PK or the FK. I have this doubt
On 28 jul, 16:17, Carlos Suarez Fontalvo <eng.carlos.sua...@gmail.com> wrote: > tnx david, i'll do that tonight. ihopethis works. I think weall > need to do an example biblio of this really nasty troubles. > > On Jul 28, 11:52 am, DavidH <djhollingwo...@gmail.com> wrote: > > > Hi Carlos > > > Why can't you follow the standard HABTM setup by inserting thenames > > of you key columns where appropriate? Something like: > > > class Modulo extends AppModel { > > .... > > var $hasAndBelongsToMany = array( > > 'TipoUsuario' => array( > > 'classname' => 'TipoUsuario', > > 'foreignKey' => 'modulo', // The PK column in this model > > 'associationForeignKey' => 'tipousauario', // The PK column in the > > other model > > 'joinTable' => 'TipoUsuarioModulo' > > ) > > ); > > > In your TipoUsuario model you'll have a similar HABTM definition with > > the same joinTable; but the other fields replaced by their modulo > > equivalents. > > > Ihopethis works for you. > > > Regards > > > David > > >PSIhopeI'vespeltallthefieldnamescorrectly. > > > On Jul 28, 5:00 pm, Carlos Suarez Fontalvo > > > <eng.carlos.sua...@gmail.com> wrote: > > > Hello, tnx for the ans, but, i already put the images in my questions, > > > and about that, what i need is precisely that data (i need to know for > > > a HABTM relationship the jointable, foreignkey, assforkey) for doing > > > the rest. > > > > I apreciate your help. > > > > On Jul 27, 3:17 pm, Piotr Kilczuk <kilc...@gmail.com> wrote: > > > > > Hello, > > > > > > Excuse me, but, nobody has answer me. It's anyone here can help me?. > > > > > tnx a lot. > > > > > In this case I'm pretty sure that you have to define additional HABTM > > > > keys in TipoUsuario and Modulo - I mean: > > > > joinTable, foreignKey, associationForeignKey. Just get one model > > > > association working 1st, and then you'll get the pattern. > > > > > HTH > > > > > Regards, > > > > Piotr --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---