symfony - in PHPCR-ODM, filter Document by a value contained in an ArrayCollection? -
for project @ work, using phpcr-odm. have document following field:
/** * @var \doctrine\common\collections\arraycollection * @phpcrodm\referencemany(targetdocument="systemsize") */ private $system_sizes;
we'd provide user list of checkboxes - 1 each possible systemsize - , search document contains at least one of systemsizes specified.
for example, suppose object has small , large, object b has medium , large, , object c has large. user selects small , medium. should find objects , b.
one of co-workers suggested creating additional field represents list of of referenced documents - in case, text field called system_sizes_list - , use comparison search against field.
given number of limitations we've run phpcr-odm, it's possible best solution... don't want believe it; surely there's better way! can't find >_>
possibly-relevant: phpcr-odm not (currently?) support leftjoin()
, in()
, or orx()->addmultiple()
(although can simulate orx()->addmultiple()
using call_user_func_array()
...)
Comments
Post a Comment