[Dbix-class] Extending 'find' to include constant value for search query

Charlie Garrison garrison at zeta.org.au
Sat Jun 23 00:46:07 GMT 2007


Good morning,

On 22/6/07 at 2:26 PM +0100, Matt S Trout 
<dbix-class at trout.me.uk> wrote:

>Yeah, but it's still not what you want - you don't want to be overloading
>find(), you want to be making sure the resultset you end up with has already
>had the ->search applied to it, like I said in my previous e-mail.

Yep, got that, was an overlap in messages. I've used your 
suggestion and it does exactly what I want.

>Assuming you're doing this for user permission restrictions, you might
>want a look at DBIx::Class::Schema::RestrictWithObject ...

Looks interesting, I'll check that out too. Especially since the 
permission model I need to implement contains much more than 
just who the user is.

Thanks,
Charlie

-- 
    Charlie Garrison  <garrison at zeta.org.au>
    PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt



More information about the Dbix-class mailing list