aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI/Controller/TestModel/Bar.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ComponentUI/Controller/TestModel/Bar.pm')
-rw-r--r--lib/ComponentUI/Controller/TestModel/Bar.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Bar.pm b/lib/ComponentUI/Controller/TestModel/Bar.pm
index 0839506..4b592c0 100644
--- a/lib/ComponentUI/Controller/TestModel/Bar.pm
+++ b/lib/ComponentUI/Controller/TestModel/Bar.pm
@@ -8,7 +8,19 @@ __PACKAGE__->config(
collection_name => 'Bar',
action => {
base => { Chained => '/base', PathPart => 'testmodel/bar' },
+ list => {
+ ViewPort => {
+ enable_order_by => [qw/name foo published_at/],
+ coerce_order_by => { foo => ['foo.last_name', 'foo.first_name'] },
+ }
+ }
},
);
+sub get_collection {
+ my ($self, $c) = @_;
+ my $collection = $self->next::method($c);
+ return $collection->where({}, { prefetch => 'foo' });
+}
+
1;