Re: hasMany weirdness

2013-09-15 Thread John Andersen
Just in case that you are using an existing database, in which you cannot change the primary key. Read about Primary key in the CakePHP documentation at this link: http://book.cakephp.org/2.0/en/models/model-attributes.html Enjoy, John Ps. make a test environment, so you can test before

Re: hasMany weirdness

2013-09-15 Thread Eric Haskins
Yeah I have the primaryKey Set on all the models that don't use just id that's why I posted it here to see if anyone else had seen this behavior. Its weird because its consistently the same records that will show blank players arrays or Team arrays. So I just started writing custom queries

Re: hasMany weirdness

2013-09-13 Thread John Andersen
Please ensure that the Players, Seasons and Divisions tables primary key is ID and not like tablename_id. When done, try again :) Enjoy, John On Friday, 13 September 2013 01:58:43 UTC+3, Eric Haskins wrote: Has anyone else seen where hasMany returns empty arrays's? Example Players

Re: hasMany weirdness

2013-09-13 Thread Eric Haskins
Ok Ill have to wait code is in production right now. On Friday, September 13, 2013 2:40:16 PM UTC-4, John Andersen wrote: Please ensure that the Players, Seasons and Divisions tables primary key is ID and not like tablename_id. When done, try again :) Enjoy, John On Friday, 13 September

hasMany weirdness

2013-09-12 Thread Eric Haskins
Has anyone else seen where hasMany returns empty arrays's? Example Players player_id Seasons season_id Divisions division_id PlayersToSeasons - hasMany Players, Seasons, Divisions, id season_id player_id division_id So many will come back perfect out of 300 players maybe 20 records