-
1. Re: EntityQuery with "global" restrictions
sean.tozer Aug 9, 2010 9:34 AM (in response to alxs.alxs.gmx.de)I'm not sure if EntityQuery would support something like that. I would suspect not.
If it can't, you could still use EntityQuery, but overwriting the relevant parsing method to do what you want it to. That would leave all the other functionality intact.
-
2. Re: EntityQuery with "global" restrictions
alxs.alxs.gmx.de Aug 16, 2010 2:53 AM (in response to alxs.alxs.gmx.de)I've already been looking into EntityQuery and Query.
The simplest would be indeed overwriting the parsing methods. Unfortunately they rely on private fields and I would have to reimplement almost EnityQuery and Query completely. -
3. Re: EntityQuery with "global" restrictions
lvdberg Aug 16, 2010 6:27 AM (in response to alxs.alxs.gmx.de)Hi,
You could add the necessary IN-annotation and override the normal getEjbql() and add the additional restrictions.
It's just providing the correct query-string to the entitymanager.Putting EL-strings in the query is helpful, but NOT necessary. It works the same by some concatting.
Leo