On 10/20/06 2:37 AM, James Masters wrote:
> This is all working wonderfully. But now I want to do a similar thing with
> an individual record for which I know the primary key value. I assume it's
> quickest/best to use Rose::DB::Object rather than Manager in this case. But
> I can't see in the documentation how to specify the class. In the Manager
> doc. it's clear but Rose::DB::Object doesn't seem to mention it and my
> various attempts so far don't work. e.g.
>
> my $record = Rose::DB::Object->new(class => $classname,
> 'primarykeyfieldname' => $pk);
> $record->load;
>
> What am I misunderstanding?
If you know the class name already, just do this:
$record = $class->new(primarykeyfieldname => $pk)->load;
-John
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object