[CDBI] ordering a has_many() dataset from TT

Arshavir Grigorian grigorian at gmail.com
Mon Jun 18 21:37:31 BST 2007


I am calling a method on an existing object to return a list of
communications associate with it. (1:M - has_many()). However, when I
try to sort the resulting dataset by a column in the "communication"
table, like so (in TT)

[% FOREACH com IN contact.communications({ order_by => 'create_dt' }) %]

I get the following error.

[Mon Jun 18 13:33:16 2007] [error] Error Processing the template:
undef error - order_by is not a column of Communication at
/usr/local/share/perl/5.8.7/Class/DBI/Search/Basic.pm line 115\n
[Mon Jun 18 13:33:16 2007] [error]

Please let me know if there is another way to accomplish this.



More information about the ClassDBI mailing list