I haven't been able to find a nicer way to do this yet and don't think i'm trying to do anything rediculous. My situation is that I have many users and many users can be linked to many objects and when viewing an object I would like to display certain objects if the link between them exists.
At the moment I have only been able to do it via the
__get magic method like so:
<?php $object->getUsers([ 'user_id = :user_id:' 'bind' => [ 'user_id' => 1, //as an example ] ]); $exists = $object->count() === 1;
Is there a nicer way to do this? Or at least get one record back instead of a record set?