-->
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.  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Mon Mar 12, 2007 7:30 pm 
Beginner
Beginner

Joined: Fri May 06, 2005 2:37 pm
Posts: 39
smcnamara wrote:
JIRA has it marked as closed/rejected and as of 3.1.3 I still see the bug/feature/design flaw/reasonable compromise (depending on your POV). If this were a democracy I'd vote to have H3 null the IDs and leave the other pojo fields alone.

so is this meant to be fixed or not guys?


This thread has been dead for a year, but unfortunately I don't think anything has changed.

At the least, could someone clarify what Steve meant in http://opensource.atlassian.com/projects/hibernate/browse/HHH-1014 by "(hint:) rolling back the object identifier"? I don't see anything in the docs that tells me how to remove an identifier from an object once it's been assigned.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 30, 2007 6:25 am 
Newbie

Joined: Wed May 30, 2007 6:01 am
Posts: 1
As a workaround, try to set
Code:
unsaved-value="undefined"
in the mapping of the auto generated id; this forces Hibernate to check (executing a SELECT) if the object is in the DB or not, regardless of the id value.
In this way you have an unnecessary SELECT, but Hibernate will insert your object instead of trying to update it.
Anyway I agree with you: since Hibernate automatically sets autogenerated ids, Hibernate should automatically reset ids to their unsaved-value during rollback of transaction.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 19, 2008 6:56 am 
Newbie

Joined: Wed Jan 16, 2008 8:23 am
Posts: 7
Hi,

Is there a solution for this in the current version? We've tried a few things, but none of them seem to work. (Including hibernate.use_identifer_rollback, which is apparently meant to be used for something else, and setting unsaved-value to "undefined", which drastically reduces the performance of batch saves.)

Cheers,
Peter


Top
 Profile  
 
 Post subject: Re: How to retry saveOrUpdate after PropertyValueException?
PostPosted: Thu Jul 30, 2009 6:16 am 
Newbie

Joined: Tue Apr 03, 2007 2:09 am
Posts: 2
Location: chennai
please just removed explicit setting of this java object

<timestamp column="UPD_TS" name="updateTimestamp" unsaved-value="null"/>


it will work

Thanks

_________________
thanks

madhukar narra


Top
 Profile  
 
 Post subject: Re: How to retry saveOrUpdate after PropertyValueException?
PostPosted: Mon Jul 15, 2013 10:33 pm 
Beginner
Beginner

Joined: Wed Jun 28, 2006 2:24 pm
Posts: 30
Location: Brazil
I'm facing the same problem. Is there a solution for this?


Top
 Profile  
 
 Post subject: Re: How to retry saveOrUpdate after PropertyValueException?
PostPosted: Sun Jul 21, 2013 11:39 pm 
Newbie

Joined: Sun Jul 21, 2013 11:36 pm
Posts: 1
just like other..
We are a raiding guild that tries to forgo the stereotype of hardcore vs. casual, and instead focuses on professional progression within our allotted time. We have a humble raid schedule, but we actively push hard during progression nights, and we seek to retain constant forward momentum.

_________________
[b][url=http://www.pkpkg.com]wow gold[/url][/b]|[url=http://www.neverwinter123.com]neverwinter gold[/url]|[b][url=http://www.d3buyer.com]D3 gold[/url][/b]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 21 posts ]  Go to page Previous  1, 2

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.