Unfortunately the Doctrine filters only allow to write "WHERE" filters in 
the SQL query, but not perform any join :(

Le jeudi 6 mars 2014 14:02:44 UTC+1, Matthieu Napoli a écrit :
>
> That is just crazy… I don't remember ever seeing that answer o_o
>
> I am definitely going to look at filters, that looks like it. Thank you!
>
> Le jeudi 6 mars 2014 13:49:40 UTC+1, Herman Peeren a écrit :
>>
>> Very interesting.
>>
>> From 
>> http://stackoverflow.com/questions/14858642/how-to-filter-my-doctrine-queries-with-symfony-aclI
>>  understood you're mainly working with Symfony's ACL. Did you do anything 
>> with that suggestion to use Doctrine filters?
>>
>> On Thursday, 6 March 2014 13:37:44 UTC+1, Matthieu Napoli wrote:
>>>
>>> Ha thanks for that answer. It's funny because right now I have a model 
>>> with the same approach (model + ACL with entities) and I tend to come to 
>>> the same conclusion, i.e. using entities for ACL is better because much 
>>> more robust, maintenable, etc. By the way, I'm working on open sourcing 
>>> that as a library in the next days.
>>>
>>> But I'm just exploring with other options, so let's say my question 
>>> stands I'm curious if that is feasible.
>>>
>>> Le jeudi 6 mars 2014 12:29:49 UTC+1, Herman Peeren a écrit :
>>>>
>>>> Sorry for the bit unusual answer to your bit unusual question: the 
>>>> easiest way to join tables instead of entities is... not to use Doctrine 
>>>> ORM at all! Why are you using an ORM anyway? ;-)
>>>>
>>>> Now seriously. At the moment I'm working on an ACL in Doctrine too, 
>>>> based on a legacy application, with both nested resources (categories 
>>>> etc.) 
>>>> and nested subjects (users, usergroups etc.). I don''t want to change the 
>>>> database, for I want the old application to keep working too as there is a 
>>>> lot of legacy code built upon it. But I am looking for ways to access the 
>>>> resources in an OOP way, building a good model for the Access Control. It 
>>>> is a challenge, but I'm convinced that *a good object-model voor 
>>>> Access Control in the end will not only have a good performance, but will 
>>>> also be much more maintainable*. So, my advice would be: I'd challenge 
>>>> the assumption that an object-model for Access Control would give too many 
>>>> entities. I'll be happy to exchange my ideas and experiments with it so 
>>>> far. Falling back to plain SQL is a dead end for me. 
>>>>
>>>> *- Herman*
>>>>
>>>> On Thursday, 6 March 2014 11:36:55 UTC+1, Matthieu Napoli wrote:
>>>>>
>>>>> Hi there,
>>>>>
>>>>> I want to do something a bit unusual: perform DQL queries and join 
>>>>> with SQL tables, not entities.
>>>>>
>>>>> The reason behind this is I want to be able to load, for example, all 
>>>>> the Products the User can see. I have an ACL system where there's a table 
>>>>> with all the authorizations from User to an ACL resource (e.g. a Product 
>>>>> id). I don't want to use entities here, because there will be a LOT of 
>>>>> ACL 
>>>>> entries, and a lot of things on which I want to restrict access too 
>>>>> (Products, Categories, …).
>>>>>
>>>>> So I'm looking for any way possible to do this. I know it's not 
>>>>> possible natively in DQL, but would that be possible in any other way? 
>>>>> Like 
>>>>> a Query Hint? Or providing Doctrine "false" metadatas, or whatever?
>>>>>
>>>>> Thanks
>>>>> Matthieu
>>>>>
>>>>

-- 
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/groups/opt_out.

Reply via email to