[Catalyst] CatalystX::CRUD

Perrin Harkins perrin at elem.com
Mon Sep 24 02:31:35 GMT 2007


On 9/23/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
> You've never implemented a saved search function that allows you to
> 'search within' a saved search?

That's usually not a difficult problem, since you already have a way
to turn criteria from a web form into a search, and you're just adding
one more criterion to the pile.

> You've never done a "view all posts owned by the selected set of users" link?
>
> This sort of thing in DBIC just becomes
>
> $posts_rs = $users_rs->search_related('posts');
>
> whereas (so far as I'm aware, please do correct me if I'm wrong) it's a bit
> more work in RDBO.

I'm not an expert on RDBO, but I believe you would need to call a
different class (the posts class, not the users) and adjust the
criteria you pass, e.g. change "last_name => 'Smith'" to
"user.last_name => 'Smith'".

Any set of ORM tools is going to have different unique features, and a
full abstraction would mean giving up all of the unique features.
However, it looked like Peter was trying to do something at a pretty
high level where hopefully the differences don't come into play much.

- Perrin



More information about the Catalyst mailing list