default FindAll / FindOne where clause

16 views
Skip to first unread message

George

unread,
May 22, 2013, 10:02:15 PM5/22/13
to cfwh...@googlegroups.com
Is there a way to the equivalent of a BeforeFind() in the model INIT to manipulate a where clause before it goes to the database?

I want to have (foo = "xxx") as the default and if there is a where statement already, then I want ((currentWhereSQL) and (foo = "xxx"))

Adam Chapman

unread,
May 22, 2013, 10:37:33 PM5/22/13
to cfwh...@googlegroups.com
Perhaps the DefaultScope plugin will help?


Regards,
Adam

George

unread,
May 22, 2013, 11:35:09 PM5/22/13
to cfwh...@googlegroups.com
That might help me find a solution. It won't solve the problem cause I want my default added to the value that is passed in. But that is a good start.
Reply all
Reply to author
Forward
0 new messages