-
1. Re: EJBQL and Logged User
lrpieri Sep 28, 2010 8:51 AM (in response to lrpieri)Can anybody help me?
Tks (-:
-
2. Re: EJBQL and Logged User
lvdberg Sep 28, 2010 9:01 AM (in response to lrpieri)Hi,
This is really a question for the Hibernate forum!
Leo
-
3. Re: EJBQL and Logged User
lrpieri Sep 28, 2010 9:13 AM (in response to lrpieri)I'm sorry Leo but I can't agree to you. My problem is happening in a extension of EntityQuery becouse of it's limitations, or mine. :-)
In one case the query will just list (and if need filter) the content of a table, in other case, the same extension of EntityQuery will need a query where will exists joins.The question is: can I change the EJBQL and RESTRICTIONS dynamically?
If yes, what is the elegant way to do this?Tks
Regards
Rogério De Pieri
-
4. Re: EJBQL and Logged User
lvdberg Sep 28, 2010 11:23 AM (in response to lrpieri)Hi,
The nice thing of Seam and JPA is that Seam intercepts the query string and looks for EL and replaces it on the fly. so basically YES you can change it dynamically. My personal preference to do this kind of things OUTSIDE the bean-code because you're mixing things which makes it difficult to maintain.
Whenevr I need a dynamic query I use the possibilities of components.xml to define it.
Leo
-
5. Re: EJBQL and Logged User
lrpieri Oct 4, 2010 3:27 PM (in response to lrpieri)Hi Leo,
I've solved my problem overriding the method getEJBQL and it seems the solution is ok. I change the return no method according the user roles.
Thanks for your help