On 6 August 2014 15:20, naitsirch <[email protected]> wrote: > Okay, I have looked into the code which is responsible for the object > hydration and came to the conclusion, that my previous idea does not work, > because during hydration I have no information about the query and its > conditions. >
In fact, the check should be applied _before_ SQL generation in my opinion. > Plus Doctrine would have to manage two instances for the same database > record, which could lead to inconsistence. > This is indeed not possible in this ORM > The next idea I had, was to extend the PersistentCollection with a > filtered "view" which could be accessed from the parent entity. But this > seems to be tricky, too. I am not sure if this functionality is > implementable with the current way of hydration :-( but I'll think about it. > You can actually use the Criteria API for this. $collection->matching($criteria) gives you what you need. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
