-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: how to use MYSQL's max & lpad in Hibernate
PostPosted: Thu Oct 14, 2004 11:48 pm 
Newbie

Joined: Wed Oct 13, 2004 10:57 pm
Posts: 1
Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

Hi,
I have a trouble in using mysql's max & lpad in Hibernate.
I need to get value from MYSQL code as folloing code:
"select max(lpad(gw_trx_id, 16, '0000000000000000')) from FP_TRANSACTION;", gw_trx_id is digital string. this code can work in MYSQL.
But I don't know how to make it work in Hibernate, I seeking example in web using google, but find no any answer. I hope Hibernate has more example for usage.

Please give me a suggestion.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.