> > Does Rose facilitate such "display-only" fields in some way?
>
> write a function in the rose class....

Thanks.  I've got this working but have hit 2 probs.  The first is that my
classes are automatically generated and adding the functions to the Extra.pm
doesn't work.  However, this is not a big deal - can just write something
special to copy the functions in - although a bit messy.

The second is that I also need to sort on one of these fields.  This doesn't
seem to happen I think because Rose delegates sorting to SQL and, of course,
SQL doesn't know about the field, which is a PERL-only entity (a perl
function).

As it happens, in this case the field can also be formulated in SQL.  And
it's standard SQL to define a field and then use it to output and to "ORDER
BY" within an SQL statement.

Can Rose work with a field defined like this?

If not, I may be able to do this outside of Rose by creating a special field
thingy in PERL that is associated with a bit of specific SQL.  I can use
this by giving it to Rose "sort_by" key.  But I'm not quite sure how to
shove it into the Rose "query" key.  Is this possible?  Or is there a more
elegant way to do this whole thing?


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