[Dbix-class] Re: doing a search

Matt S Trout dbix-class at trout.me.uk
Mon Jan 22 13:19:58 GMT 2007


On 21 Jan 2007, at 17:45, A. Pagaltzis wrote:

> * Nilson Santos Figueiredo Junior <acid06 at gmail.com> [2007-01-21  
> 06:35]:
>> I don't really agree with that. I think the "id" suffix in e.g.
>> "user_id" describes exactly the data that field contains: an
>> user id. It doesn't really contain the actual user object -
>> which can be fetched through the relationship "user".

I tend to use <relname>_<f_col_name> - so user_id, or owner_id, or  
whatever might refer to user.id. Using only the table name is kinda  
foolish because it screws you when you have multi-col PKs.

-- 
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Dbix-class mailing list