Did you try it? :)  I already do expansion (and sometimes compression to tN
aliases) within sort_by strings.

Yes. "sort_by => 'id'" did not work, error came from DBI, was "ORDER BY id" - so no expansion at all.
(All three tables had the 'id' column.)

DBD::mysql::st execute failed: Column: 'id' in order clause is ambiguous at /home/uwe/tmp/cvs/rose/modules/Rose-DB-Object/lib/Rose/DB/Object/Manager.pm line 929. get_objects() - DBD::mysql::st execute failed: Column: 'id' in order clause is ambiguous at /home/uwe/tmp/cvs/rose/modules/Rose-DB-Object/lib/Rose/DB/Object/Manager.pm line 929. at /home/uwe/tmp/cvs/rose/modules/Rose-DB-Object/lib/Rose/DB/Object/Manager.pm line 1477 Rose::DB::Object::Manager::get_objects('Rose::DB::Object::Manager', 'clauses', 'ARRAY(0x89e6e60)', 'require_objects', 'ARRAY(0x8151d28)', 'object_class', 'Product', 'sort_by', 'id', ...) called at /home/uwe/proj/rose/example/require-with.pl line 52

The "data structure" sort-by arg won't require any string parsing, if I can
help it.  It's going to be more verbose than the string version, so I want
it to be unambiguous.  Then it'll have one clear advantage, at least.
Instead of being "longer and slightly less fuzzy" it'll be "much longer but
absolutely explicit."  Anyway, I expect the string version to be the most
common.

Please make the common case (sort by one column of the main object) quite short.

Note: I did not say "as short as possible" :-)


Thanks,
bye Uwe


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to