-
1. Re: Is "<=" not supported in JBoss EJB-QL?
noel.rocher Nov 6, 2002 9:37 AM (in response to reneticus)Hi Rene,
OK, it's a well known thing. Keep cool.
If you look at the 2.0 EJB specs you will find that in EJB-QL, you can only use "<" or "=" or ">" for date comparison.
If you look at the 2.1 EJB specs you see that this is corrected.
Our folks from JBoss make very clear what is in the spec and what isn't. Good thing !
So they give us jboss-ql (for where clause with "LIKE ?1" and other ejb-ql extensions) and declared-sql for things you can't do with ejb-ql and jboss-ql.
So, when specs 2.1 will be supported, this will evolve.
For your problem : try to write
NOT (ds.dsDateFrom > ?1) AND NOT (ds.dsDateTo < ?1)/b]
Hope this helps
Noel -
2. Re: Is "<=" not supported in JBoss EJB-QL?
noel.rocher Nov 6, 2002 9:39 AM (in response to reneticus)ignore the /b] that is the end of the bold tag that I missed.
-
3. Re: Is "<=" not supported in JBoss EJB-QL?
reneticus Nov 6, 2002 8:32 PM (in response to reneticus)Thanks noel for the info. This helps a lot. It appears that I'm the one that violated the specs :).
-
4. Re: Is "<=" not supported in JBoss EJB-QL?
reneticus Nov 6, 2002 8:51 PM (in response to reneticus)Thanks noel for the info. This helps a lot. It appears I'm the one that violated the specs :).
-
5. Re: Is "<=" not supported in JBoss EJB-QL?
reneticus Nov 6, 2002 8:54 PM (in response to reneticus)Thanks noel for the info. This helps a lot. It appears I'm the one that violated the specs :).
-
6. Re: Is "<=" not supported in JBoss EJB-QL?
noel.rocher Nov 7, 2002 5:25 AM (in response to reneticus)Another wel known thing is that sometimes you can't see the replies.
It's a bug from the forum software (Jive I think) that make people will develop one.
If you wait a while after replying, all should be corrected. So you can avoid multiple copies ao the same message.
Noel -
7. Re: Is "<=" not supported in JBoss EJB-QL?
th.otto Nov 12, 2002 10:56 AM (in response to reneticus)On a postgres-database this does not work. Maybe the date-Mapping is not correct for the date object?
I use Xdoclet:
* @jboss:column-name name="date"
* @jboss:sql-type DATE
* @jboss:jdbc-type DATE
*/
public abstract java.util.Date getDate();
And the query is:
query="SELECT OBJECT(o) FROM Inventory AS o WHERE NOT (o.date > ?1) AND NOT (o.date < ?1)"
Without the filter returns the correct results.
Has anybody an idea?
Thank you.
Bye Thomas -
8. Re: Is "<=" not supported in JBoss EJB-QL?
pssaran Nov 13, 2002 7:44 AM (in response to reneticus)Hi,
What is the data type used here?
I have used java.util.Date. I didn't get any error as well as result.
Please help me to fix this problem.
Thanks in advance.
Regards
Saravanan S