In the most recent release there was this item,

* Added support for literal sort_by parameters using scalar references.

Which I think might have lead to the following code, see 
Rose/DB/Object/QueryBuilder.pm line 216.

$sort_by  = join(', ', map { ref $_ ? $$_ : $_ } @$sort_by)   if(ref 
$sort_by);

In the above any argument that is a reference attempts to dereference a 
scalar, which is problematic for obviously anything that is not a 
scalar, which in our case was specifically causing an error when we 
tried to set the sort_by values to the primary key columns directly,

$args{get_objects_args}->{sort_by} =
     $_model_class->meta->primary_key_columns;

Which I am assuming previously worked because the meta returned for the 
columns is an object that stringifies nicely. So I'd like to propose at 
least the following:

$sort_by  = join(', ', map { ref $_ eq 'SCALAR' ? $$_ : $_ } @$sort_by) 
   if(ref $sort_by);

Note the check of the ref to see if it is specifically a scalar. Adding 
the above patch to our version fixed the issue nicely, obviously other 
successful changes we would be open to. Not sure, but someone may want 
to examine the line immediately above it which does something similar 
for 'select'.

Thanks,

http://danconia.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to