-->
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.  [ 5 posts ] 
Author Message
 Post subject: "check version but do not increment it" scenario
PostPosted: Wed Jul 21, 2004 9:48 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
Hi there!

In my current project we need the following scenario: Hibernate checks object version but it does not increment version when it updates fresh (not stale) object and throws StaleObjectStateException when object is stale. Is it possible to implement this scenario in current Hibernate?

We need this functionality to implement some kind of object syncronization between two database servers. It should be PostgreSQL and MS SQL servers (we could not use any relational replication services because of two different DBMS and usage of 2nd level cache, so we should make it through Hibernate).

--
Thanks,
Leonid


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 21, 2004 10:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It is not the default behavior, but I imagine it would be pretty trivial for you to patch Hibernate to disable version number increment in certain circumstances.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 21, 2004 10:12 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
gavin wrote:
It is not the default behavior, but I imagine it would be pretty trivial for you to patch Hibernate to disable version number increment in certain circumstances.


It would be more suitable for me if this functionality was part of hibernate else I should patch each new stable Hibernate release :)
"New Feature" request?

--
Leonid


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 21, 2004 10:18 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Not unless you can convince us that this is a general requirement, which i doubt it is.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 21, 2004 10:32 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
gavin wrote:
Not unless you can convince us that this is a general requirement, which i doubt it is.


If in the future hibernate needs some kind of replication functionality (I mean replication between two different relational databases) you should implement "check version but do not increment it" scenario, and maybe then it would become a general requirement.

But if you need it? :)

--
Leonid


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

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.