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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate such that changes don't propagate to DB
PostPosted: Thu Sep 04, 2008 11:48 am 
Newbie

Joined: Wed Sep 03, 2008 12:46 pm
Posts: 6
Hibernate version: 3.2

Name and version of the database you are using: DB2

I am coding what was supposed to be a fairly simple UI for administering some data... and then internal politics reared its ugly head and made things interesting. Management now does not want the tool to make changes to production directly. Instead, they want to point it at a staging environment (which mirrors production), capture the changes made, and export them as a SQL file that can be handled off to the DB support guys like any other change. Yeah, I know this is somewhat defective-by-design... but it is what it is, and I don't have the clout to change the big picture.

Is it even possible (generally speaking) to use Hibernate such that it will read data from the database, and allow you to make changes to the data objects, yet not actually write those changes to the database? If Hibernate has the ability to capture the changes made, that would be even better... but I could settle for handling that logic at the controller level. I'm just trying to figure out whether Hibernate is still a usable option in this scenario at all. Thanks in advance!


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Sep 04, 2008 12:46 pm 
Newbie

Joined: Wed Sep 03, 2008 12:46 pm
Posts: 6
After having my morning caffeine, it occurs to me that I could simply never call the session's "save()" method. That might be fine, although I may have to juggle some state issues since this is a web app (i.e. put the dirty objects on the HTTP session between page loads). Does anything get written to the database in absence of a session "save()" call, or would that be safe in terms of not ever writing to production?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.