Feature Request #4349

Add has_any function or ORM

Added by Jim K 6 months ago. Updated 4 months ago.

Status:Closed Start date:11/29/2011
Priority:Normal Due date:
Assignee:Woody Gilk % 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

Revision 980c9da7
Added by Jim K 4 months ago

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

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

Also available in: Atom PDF