This content has been marked as final.
Show 4 replies
-
1. Re: jboss support EJB QL??
ebaskoro Jan 19, 2004 10:45 PM (in response to dennislee)G'Day,
Unfortunately, EJB-QL does not support >= and <= operators. You may use JBossQL to overload the query string.
Or you can specify it as
SELECT OBJECT (a) FROM mytable AS a WHERE ( a.age > ?1 OR a.age = ?1 ) AND ( a.count < ?2 OR a.count = ?2 ) -
2. Re: jboss support EJB QL??
dennislee Feb 19, 2004 12:48 AM (in response to dennislee)thank you very much
but if the field type is TDateTime (in DataBase) ,how can i map it to JBOSS? to String type or to java.sql.Date ? or to java.sql.Timestamp??
and how can i write such as following (in EJb-QL)
SELECT OBJECT(a) FROM mytable AS a WHERE mydate >= ?1 AND mydate <= ?1
help me -
3. Re: jboss support EJB QL??
lrodrigu19 Feb 23, 2004 9:30 PM (in response to dennislee)Try This:
(a.startDate > ?1 OR a.startDate = ?1) AND (a.endDate < ?2 OR a.endDate = ?2)
Larry -
4. Re: jboss support EJB QL??
erik777 Feb 26, 2004 9:39 AM (in response to dennislee)if the field type is TDateTime (in DataBase) ,how can i map it to JBOSS? to String type or to java.sql.Date ? or to java.sql.Timestamp??
I use MySQL, and the defaults work. I also have instance in jbosscmp-jdbc where I have the following, which may be the same as the default:<cmp-field> <field-name>logoutTime</field-name> <column-name>logoutTime</column-name> <jdbc-type>TIMESTAMP</jdbc-type> <sql-type>DATETIME</sql-type> </cmp-field>