logo       

Re: questions about the manager: msg#00005

lang.perl.modules.dbi.rose-db-object

Subject: Re: questions about the manager

On 6/1/06, Guillermo Roditi <groditi-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
wrote:
I need to call manager methods, however I can not make the assumption that I
know the names of these methods because they change. This seems like it could
be easily solved by doing a select_objects(object_class => $object_class,
where =>...) but does anyone have a better idea?

I think you mean get_objects(). And yeah, that's what I'd recommend.
The specially-named wrappers are just to make things pretty. Calling
the underlying method is perfectly valid.

also there since isnt anything like insert_or_update should i :
$class->insert unless $class->update;

or is save smart enough for that?

The save() method will do the right thing. On the flip-side, the
load_or_insert method in Rose::DB::Object::Helpers might be useful:

http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/Helpers.pm#load_or_insert

any plans for supporting on duplicate key update?

I'm not sure what you mean by this...

-John


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise