logo       

questions about the manager vs the standard object: msg#00009

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

Subject: questions about the manager vs the standard object


given:

table object
id serial bigint
name varchar 64
type integer references object_type(id)
table object_type
id serial
name varchar 64
object_category__id integer references object_category(id)
table object_category
id serial
name varchar 64

i need to pull the record for
object->new( id=>100 )

but i need to have the object_category__id as well

i know how to do this with a Manager class -- use object_requires, and rosedb will automagically pull the right info for me on a join

if i use a Manager class though, it will return an array of matching objects

whenever I do this query, this can only be a single resultset

is there a way for me to do this without using a manager class method to retrieve an array and just address element 0? or must i handle this as an array?




-------------------------------------------------------
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