[CDBI] ordering a has_many() dataset from TT
"Arshavir Grigorian" <[email protected]> Mon, 18 Jun 2007 13:37:31 -0700
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
Hi,
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.
TIA.
Arshavir