Posted on 2006-07-28 12:08:15-07 by errno
Auto init and foreign keys

First Rose DB rocks!

I am following the canoical method of auto init like this -

__PACKAGE__->meta->table("footable"); __PACKAGE__->meta->auto_initialize;

But it does not pick up the foreign keys, since the table -> class mapping of the reference is not obvious. I tried adding:
__PACKAGE__->meta->foreign_key( ffkey => [ .......] )

or add_foreign_key resulting in various complaints in redefining methods or unknown methods.
If you can suggest a way to do that it would really make my mapping modules auto-magical since I really would like to use auto_initialize.

thanks!

- r
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.