Hello Rose List!

Is there a way, using Rose::DB::Object::Loader, that the generated  
classes can be instructed to include the 'schema' meta value?  I took  
a peek under the hood, and can't figure out the proper place that a  
patch would have to be applied to add an option such as  
'include_schema', or something similar.

Ideally, I would like to be able to something like this:

my $db = My::DB->new();
my $loader = Rose::DB::Object::Loader->new(
                                                        db_dsn                  
=>      $db->dsn,
                                                        db_username     =>      
$db->username,
                                                        db_password     =>      
$db->password,
                                                        db_schema               
=>      "some_schema",
                                                        class_prefix            
=>      "My::New::DB::Object",
                                                        base_class              
=>      "My::DB::Object",
                                                        db_class                
=>      'My::DB',
                                        );

$loader->make_modules(
        module_dir => "/some/path/name",
        with_unique_keys => 1,
        with_relationships => 1,
        include_schema => 1,
);

and have the resultant class look like:

package My::New::DB::Object;

use strict;

use base 'My::DB::Object'

__PACKAGE__->meta->setup(
        schema => 'some_schema',
        table => 'a_table',
        etc...
);

1;

Am I just completely missing the obvious, and there is already a way  
that this can be done?

Best regards,
Chris

-------------------------------------------------------------------------
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
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to