* Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]> [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 don’t feel the need to append `_ref` to all my variable names
in Perl when I create objects, even though they don’t hold the
object, they hold a reference to it.
> Note that it doesn't mean that "user" (i.e. the prefix) should
> always be the name of the referenced table. In that posts
> example you could use a field called "author_id" which would
> reference an user. No problem with that since your intent would
> be clear when describing the relationship.
LEFT JOIN ON entry.author_id = user.id
Is this right? Is this wrong? No idea. I’ll have to look at the
schema to see whether `entry.author_id` does in fact reference
`user.id`. If it were `entry.author_user`, I’d know immediately.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/