Sorry to be the resident newbie with the idiot questions....

I need to do a loading of 'assets' based on user_id

ie table: assets
        id - primary key
        date_added
        useraccount_id
        asset_type
        asset_name
        file_path

based on the docs, the way to go woult be

package MyApp::RoseDB::Asset;
use base qw(Rose::DB::Object);
"""snip
__PACKAGE__->make_manager_methods('asset')


package main;
my      $db_asset= MyApp::RoseDB::Asset->get_asset(
                useraccount_id => $self->get_profile('id')
);

The problem is that I'm doing this little hack elsewhere on the load/ save via primary keys:
        my $db_asset = MyApp::RoseDB::Asset->new( params )
        $ db_asset->db->dbh( $self->{'__DB'}{'DBH'} );
        $ db_asset->load;

I'm not sure how I can either swap a DBH into the ObjectManager class, or just ignore it altogether (which I would not be averse to doing )

Does anyone have a suggestion on how to approach this?

| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -






-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to