[Catalyst] create=static

Octavian Rasnita orasnita at gmail.com
Tue Jan 2 06:20:16 GMT 2007


Hi,

I have tried the following:

perl script/tranzactiibursiere_create.pl model Db DBIC::Schema Db 
create=static dbi:mysql:database=intranet root

First, I have seen that this command creates all the class files for each 
table, but some of them are not complete. For example, even though I have 
used in some tables columns defined with:

references table_name(id)

The program doesn't add the line
__PACKAGE__->belongs_to(...)

And the lines
__PACKAGE__->has_many(...)
are not added automaticly either.

It is not a big problem to insert them manually, but sometimes I need to 
modify the table definitions, and in that case I need to create them again 
manually.

How do you do this to be more easy?

I have also tried using the parameter create=dynamic but I have seen that it 
is creating only the model and not the table classes also.
What is this option exactly doing, and how should it be used, or why it 
doesn't create the table classes?

Thank you.

Octavian




More information about the Catalyst mailing list