php-activerecord icon indicating copy to clipboard operation
php-activerecord copied to clipboard

Has_Many will not find default primary key of "id" if it is not in first column of table.

Open csantosdev opened this issue 14 years ago • 0 comments

Took me 5 hours to figure out why my relationship was not being pulled. Come on find out it was testing it against the wrong field of the table. Could be helpful to throw an exception if Primary key not found instead of assuming first column is the key.

Thanks

csantosdev avatar Nov 03 '12 21:11 csantosdev