You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Bruno Rene Fernandes Monteiro Duarte dos Santos <br...@holos.pt> on 2010/11/12 09:04:38 UTC
Filtering queries and relationships
Hello all,
Is there any way on Cayenne where i can insert a default where clause that
would limit all queries and relationships for a specific class? I need to
do this to filter resources on a web application.
Regards
Bruno Santos
Re: Filtering queries and relationships
Posted by Andrus Adamchik <an...@objectstyle.org>.
No, entity qualifiers can't be parameterized. So you'd have to do it on a per-query basis or create separate DataMaps for each class of users or something.
Andrus
On Nov 12, 2010, at 5:09 AM, Bruno René Santos wrote:
> This is a start. Can a qualifier receive a parameter? Like a $accountIds. For
> each user of the web application the qualifier will be different.
>
> Regards
> Bruno
>
> -----Mensagem original-----
> De: Aristedes Maniatis [mailto:ari@maniatis.org]
> Enviada: sexta-feira, 12 de Novembro de 2010 08:47
> Para: user@cayenne.apache.org
> Assunto: Re: Filtering queries and relationships
>
> On 12/11/10 7:04 PM, Bruno Rene Fernandes Monteiro Duarte dos Santos wrote:
>> Hello all,
>>
>> Is there any way on Cayenne where i can insert a default where clause that
>> would limit all queries and relationships for a specific class? I need to
>> do this to filter resources on a web application.
>
>
> http://cayenne.apache.org/doc/modeling-objentities.html
>
> --> ObjEntity Qualifier
>
>
>
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>
>
RE: Filtering queries and relationships
Posted by Bruno René Santos <br...@holos.pt>.
This is a start. Can a qualifier receive a parameter? Like a $accountIds. For
each user of the web application the qualifier will be different.
Regards
Bruno
-----Mensagem original-----
De: Aristedes Maniatis [mailto:ari@maniatis.org]
Enviada: sexta-feira, 12 de Novembro de 2010 08:47
Para: user@cayenne.apache.org
Assunto: Re: Filtering queries and relationships
On 12/11/10 7:04 PM, Bruno Rene Fernandes Monteiro Duarte dos Santos wrote:
> Hello all,
>
> Is there any way on Cayenne where i can insert a default where clause that
> would limit all queries and relationships for a specific class? I need to
> do this to filter resources on a web application.
http://cayenne.apache.org/doc/modeling-objentities.html
--> ObjEntity Qualifier
--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
Re: Filtering queries and relationships
Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 12/11/10 7:04 PM, Bruno Rene Fernandes Monteiro Duarte dos Santos wrote:
> Hello all,
>
> Is there any way on Cayenne where i can insert a default where clause that
> would limit all queries and relationships for a specific class? I need to
> do this to filter resources on a web application.
http://cayenne.apache.org/doc/modeling-objentities.html
--> ObjEntity Qualifier
--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A