[jifty-devel] Column naming oddness for refers_to() in Jifty::DBI

Sean E. Millichamp sean at enertronllc.com
Fri May 19 14:11:14 EDT 2006

On Fri, 2006-05-19 at 13:05 -0400, Jesse Vincent wrote:

> It needs to be documented. What happened was that we built a rather
> large application and named all our foreign keys as _id. And discovered
> that it really didn't make any sense to  be reading code like:
> $foo->user_id->name
> _At the time_, it mae a lot of sense that $foo->user_id should get you
> the literal id and $foo->user should get you the object itself.
> Does that make any sense at all?

It does.  As it turns out, I was naming columns all with _id and was
failing to understand why I should bother using 'refers_to' since it
seemed to do nothing for me!  I have committed a documentation patch
covering refers_to which hopefully will make sense to others :)


 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20060519/191d3719/attachment.pgp

More information about the jifty-devel mailing list