[jifty-devel] db relations

Jesse Vincent jesse at bestpractical.com
Wed May 17 22:54:24 EDT 2006

On May 12, 2006, at 3:02 PM, Michael Gee wrote:

> Hi list,
> Could someone please give me a quick pointer in how to setup some  
> table relationships with the DB schema.  For instance a column that  
> holds a foreign key (a primary index in another table).  I'd like  
> to set up some HAS_A & HAS_MANY relationships.
> I see a note about the method: refers_to() in the docs, but I'd  
> track down the usage of that method, or where in my code I would  
> call it.

column user => refers_to MyApp::Model::User;

column articles => refers_to MyApp::Model::ArticleCollection by id;

More information about the jifty-devel mailing list