So I'm trying to get Rose::DB::Object set up. I have my database
class. I have my tables. I have my base object class. I would like
to generate all of my specific classes.
Rose::DB::Object wants to have plural table names. I have singular
table names. But that is supposed to be configurable. The tutorial
says you can just change conventions in the convention manager. The
convention manager documentation says that I can change that
convention with tables_are_singular. But when I try it, it doesn't
work. Here is some non-working code:
my $class = "ReportHistory::Installation";
no strict 'refs';
@{"$class\::ISA"} = 'ReportHistory::Object';
$class->meta->convention_manager->tables_are_singular(1);
$class->meta->auto_initialize();
print $class->meta->perl_class_definition(indent => 2);
This gives me an error because it can't find the table installations.
But didn't I just tell it that tables are singular? I can get around
this by setting the table name explicitly, but I'd like to know why
the above didn't work.
I strongly suspect that the problem is that I have found the wrong
convention_manager. However I don't know how one would go about
finding the correct one. And I don't have a clear idea of
Rose::DB::Object's class hierarchy, so I don't even know where I would
go poking around for it.
Does anyone know?
Thanks,
Ben
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object