[Solar-talk] _hasOne Help

Rodrigo Moraes rodrigo.moraes at gmail.com
Wed Nov 14 12:17:48 CST 2007


On Nov 14, 2007 4:12 PM, Kilbride, James P. wrote:
> This is why I don't really like solar's assumption that there is an ID
> column on all tables since I like to have the primary key Id called even on
> it's native table by the id type rather than simply id. It's purely a
> 'preference' thing but I tend to have my market tables, for example, have
> Market_Id as the primary key and company has Company_Id, so the names have
> an easy to see equivalence relationship when they end up foreign keyed in
> other tables.

oh, but this is just a convention. in your models, you can use any
primary key name you want overriding the property $_primary_col:

    $_primary_col = 'my_column_name';

-- rodrigo


More information about the Solar-talk mailing list