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: Using JPQL, including Sysdate in INSERT Statement, Opt Lock
PostPosted: Wed Jul 06, 2011 4:41 pm 
Newbie

Joined: Wed Jul 06, 2011 4:22 pm
Posts: 1
Here's what we want to do: Using JPQL (avoiding native SQL), we want to include inside the generated SQL INSERT statement the Oracle SYSDATE function. So when Oracle sees the INSERT statement with the SYSDATE it will convert it to current time before it does the insert.

Here's where it gets complex: the field that uses the SYSDATE function that we want to send in the INSERT statement, that's also the field we want to use for optimistic locking (@Version). HQL, JPQL, code, annotations, we don't care how we need to implement it...all we want to do is avoid native SQL AND utilize Hibernate's built in optimistic locking features.

I hope this makes sense. I'm not optmistic that we'll find a solution, but I thought I'd ask the experts.

Thanks.


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.