[Dbix-class] Re: doing a search

A. Pagaltzis pagaltzis at gmx.de
Sat Jan 20 21:37:33 GMT 2007


* 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/>



More information about the Dbix-class mailing list