Hi all,

I have a trouble here while trying to find most recent date register from my 
table.

Here goes my finder method:

anonymous wrote : 
  | public Project findLastCreated() throws RemoteException{
  |     String ejbQl = "select max(p.creationDate) from Project p";
  |     Project result = entityManager.createQuery(ejbQl).getSingleResult();
  |     return result;
  | }
  | 

When running this method it gives me an exception because something about 
timestamp.

The database is MySql and the field "CREATION_DATE" is "DATETIME" type.   
Anyone can help me?  How can I find the most recent date register using EJB QL?

Regards,
Fabricio Braga

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919318#3919318

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919318


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to