On Jun 24, 2007, at 7:32 PM, John Siracusa wrote:

> On 6/24/07 5:53 PM, James Masters wrote:
>> 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).
>
> There's some experimental support for stuff like that, but it will  
> require
> you to define a new column class:
>
> http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/ 
> msg00710.ht
> ml
>
> But I agree that a better solution is needed...

What if you do a custom manager class ?

I posted some code to the list a while back...

it overwrote the manager class, and calling the regular get_objects 
()... but returing a ref to a blessed array instead of a normal array.
the blessed array had sort and other methods on it...

so the code to interact would be:

my      $names= myapp::names::manager->load_names();
        foreach my $name ( @{$names->blessed_class_sort_method() } )
        {
                #do something.
        }


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|   CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|     Founder/CTO/CVO
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



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