--- "A. Pagaltzis" <[EMAIL PROTECTED]> wrote:
> * Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]>
> [2007-01-20 17:55]:
> > The best way IMO is to have the field named
> "role_id" then name
> > your relationship as "role".
>
> Am I the only one who uses ${desc}_${othertable} as
> the name for
> FK columns? Eg. a table with weblog posts/comments
> in a system I
> design might look like this:
>
> CREATE TABLE entry (
> id INTEGER PRIMARY KEY,
> author_user INTEGER REFERENCES user(id),
> body TEXT
> );
>
> Regards,
> --
> Aristotle Pagaltzis // <http://plasmasturm.org/>
I usually make the FK column the same as the column
name of the referencing table. Then again, I've often
been accused of having too little imagination :)
-john
>
> _______________________________________________
> 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]/
>
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
_______________________________________________
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]/