ouzo icon indicating copy to clipboard operation
ouzo copied to clipboard

[ORM] All::of and Restrictions::any and Restrictions::all

Open woru opened this issue 9 years ago • 2 comments

woru avatar Jun 30 '15 07:06 woru

Provide an example.

piotrooo avatar Jul 19 '15 17:07 piotrooo

User::where([
   'registration_date' => Restrictions::any(Restrictions::graterThan($from), Restrictions::lessThan($to))
]);

results in 'OR'.

We need something like:

User::where([
   'registration_date' => Restrictions::all(Restrictions::graterThan($from), Restrictions::lessThan($to))
]);

Restrictions::any will return a composite restriction.

woru avatar Aug 04 '15 11:08 woru