[jifty-devel] Some Jifty starter questions

Thomas Sibley trs at bestpractical.com
Fri Jul 14 11:34:19 EDT 2006


Rolf Schaufelberger wrote:
> 4. Currently I use Class::DBI, and there I have   references  has_a and 
> has_many.  So 'has_a' corresponds to 'refers_to' , but how can I make the 
> same like has_many ?

For has_many, instead of

refers_to MyApp::Model::Foo by 'bar';

use

refers_to MyApp::Model::FooCollection by 'bar';

> 5. When I create a MyModel::Model::MySchema.pm like :
> (real names were PGP::Model::MParam) 
> 
[snip]
> 
> and when I change  the last line   to
> 
> refers_to PGP::Model::Motiv,

It's probably just a typo, but if it's not, that comma at the end of the 
line above should be a semicolon ; in your real model.

> (without ' ) I get no error but the column motiv doesn't become created.
> The docs doesn't tell me wheather I shall put the class name in '' or not.

Either way should work, I think.  You might need to "use" the model to 
which you're referring though.

Hope that helps.

Tom


More information about the jifty-devel mailing list