This content has been marked as final.
Show 4 replies
-
1. Re: framework:restrictions - query based on a date from - to
ztiringer Nov 16, 2009 5:31 AM (in response to magiccreative)I would suggest you leave the xml and create a class that extends EntityQuery<com.pck.Query> and there it is much easier to define restrictions (at least I personally use that so I am not too familiar with the xml syntax, but probably you just need to use two separate restriction definition within the restrictions tag).
Anyway if you end up creating a class make sure to include the following:
private static final String[] RESTRICTIONS = { "q.created > #{dateFrom}", "q.created < #{dateBis}",};
If you used seam-gen then just check the code of any XXXList.java class for pointers.
-
2. Re: framework:restrictions - query based on a date from - to
magiccreative Nov 16, 2009 9:23 AM (in response to magiccreative)Thanks for the answer,
The issue in xml is that the
< and >
are openning /closing tags, which leads to an error. I was looking for a way to overcome this.When nothing helps I will put the restrictions in the extended query class as you sujest, thanks again.
-
3. Re: framework:restrictions - query based on a date from - to
magiccreative Nov 16, 2009 10:09 AM (in response to magiccreative)Problem solved
Just used
>
and<
codes of the comparison symbols. -
4. Re: framework:restrictions - query based on a date from - to
afibarra.armando.flores.biovetsa.com.mx Feb 10, 2010 4:05 AM (in response to magiccreative)Thank you very much. Your post helped me a lot !!!