>
> but what if the user really wants that filtering to be applied?
>

I am not sure if I have understood you. The current situation is that the 
filtering is only applied at the first query. All later made queries will 
return the same result (of children associations) and that is not only 
false, it could lead to data damage and security holes. User may view data 
which they are not allowed to view, because the filtering in the query does 
not work (see my above example).

yes, but then we'd break BC quite badly.


That could be true, but it is only breaking compatibility where users are 
relying on a "mistake" in Doctrine. Because, when I add a condition to a 
query to filter child records, I expect that this condition is represented 
by the result. But this is not true for the current situation.

Or am I missing something?

Am Montag, 4. August 2014 13:51:59 UTC+2 schrieb Marco Pivetta:
>
>
> On 4 August 2014 13:46, naitsirch <[email protected] <javascript:>> 
> wrote:
>
>> The second DQL query is invalid, as you are fetch-joining and hydrating a 
>>> subset of the actual association.
>>>
>>  
>> Is it documented anywhere?
>>
>>>
> I don't really know that, but if it isn't, then it should be added to the 
> "DQL" chapter.
>
> That is a logical mistake, and doctrine can't detect it nor can support it.
>>>
>>  
>> I think Doctrine can detect it. Well, its not trivial, but doctrine knows 
>> the references and can see that there are conditions for the fetch-joined 
>> associations, which could limit the results.
>>
>
> It can probably be done in an AST walker, but what if the user really 
> wants that filtering to be applied? A hint can be added to allow such 
> operations, yes, but then we'd break BC quite badly.
>
> 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.

Reply via email to