Feature Request #4349
Add has_any function or ORM
| Status: | Closed | Start date: | 11/29/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | - | |||
| Target version: | Kohana v3.x - v3.3.0 | |||
| Resolution: | fixed | Points: | 1 |
Description
ORM::has requires that the results match the number of passed in keys. I would find it useful to have a method that just checks for the existence of a match.
For instance if a user has either the 'edit' or 'admin' role.
Another example could be if I have a table mapping a product id and store id to a date and price_delta and I would like to check for the existence of a schedule for a product at a store.
Associated revisions
Added ORM::has_any() for checking if a relationship exists, moved ORM::has() to ORM::count_relations(), recreate ORM::has(). Fixes #4349.
History
Updated by Jim K 6 months ago
Made pull request https://github.com/kohana/orm/pull/47
Updated by Woody Gilk 4 months ago
- Status changed from New to Assigned
- Assignee set to Woody Gilk
- Target version set to v3.3.0
- Resolution set to fixed
Updated by Woody Gilk 4 months ago
- Project changed from Kohana v3.x to ORM
- Category deleted (
Modules:ORM)
Updated by Jim K 4 months ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset 980c9da7dfd0a581d60dfa7c3d263b33b71d9b05.