On 8/30/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> I don't need the whole record, nor do I need an object.    I just
> need Link, under certain circumstances, to be aware of the hex_id
> value in the corresponding Useraccount page
>
> Is there any way to do this , without loading an entire object?  I
> don't think so, as rose is very object minded - and this probably
> breaks with the design ideology.  I just needed to ask, to save a bit
> of db and memory overhead.

You just want to omit some columns.  You're still fetching logical (if
not "whole") row objects, so there's no semantic conflict with the
existing Manager methods.

One way to do what you want is to make all the columns in the
Useraccount table "lazy" except for the primary key and hex_id
columns.  Then when you do your manager query, only those columns will
be selected.

Of course, that'd also force you to pass nonlazy => 1 to all load()
and other Manager calls where you don't want this to happen.  So maybe
that's not what you want.

A more flexible (but more verbose and explicit) alternative is to use
the "select" parameter to get_objects().  That'll let you cherry-pick
your columns from all tables involved in the query.  Check the
Rose::DB::Object::Manager::get_objects() documentation for details.

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

Reply via email to