[Dbix-class] Re: doing a search

John Napiorkowski jjn1056 at yahoo.com
Sat Jan 20 22:55:44 GMT 2007


--- "A. Pagaltzis" <pagaltzis at gmx.de> wrote:

> * Nilson Santos Figueiredo Junior <acid06 at gmail.com>
> [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/dbix-class@lists.rawmode.org/
> 



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/



More information about the Dbix-class mailing list