On 5/11/07, Michael Reece <[EMAIL PROTECTED]> wrote:
> 1. is there a way to pull that off with 'one to one' type
> relationship so i can drop the subroutine?

Not unless you add an is_latest column or something to the table.

> 2. or is there a way to tack on extra conditions (or custom ordering)
> to existing relationships, so i can keep the subroutine and drop the
> extra relationship?

Check out the "find" method type:

    $latest =
      $o->find_messages(sort_by => 'message.pubdate DESC',
                        limit => 1)->[0];

I guess you'd still want to wrap that in a nice method name, but at
least you don't have to create a new relationship.

-John

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to