Re: I'm having problems with associations...

2007-12-04 Thread Serge Rodovnichenko
1. Add $primaryKey = 'zip'; in Zipcode model. 2. Define 'foreignKey'='zip' in $hasMany association. 3. Your associations should looks like: User belogsTo Zip, Zip hasMany Users. On Dec 4, 9:02 am, Jon Hinson [EMAIL PROTECTED] wrote: Ok, I can't seem to solve this problem for the life of me. I

I'm having problems with associations...

2007-12-03 Thread Jon Hinson
Ok, I can't seem to solve this problem for the life of me. I have a User model and a Zipcode model. Zipcode hasMany users. I want them to join on User.zip = Zipcode.zip. I have to join on Zipcode.zip and not Zipcode.id because a zipcode can have many rows because of several city names, etc. I