-->
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: NHibernate with only inserts
PostPosted: Sun Oct 05, 2008 12:48 pm 
Newbie

Joined: Sun Apr 20, 2008 12:01 pm
Posts: 2
Hello!

I am new to NHibernate.

In my current project, the requirements are that data should not be updated nor deleted.

One suggestion is this:
When a user updates an address, the old address should be kept. The user initiated update generates a SQL INSERT not an UPDATE. It is similar for deleting an address, the address is never deleted. Insted an INSERT is done in a table that keeps track of the status of an address. The address is set to inactive.

Using this technique it is possible to have access to all historical data.
Is there some kind of "pattern" in Nhibernate that supports this scenario?

Another option to keep all historical data is to use a separate database for historical data. When an address is updated, the old values are saved to the historical database.
Is there some kind of "pattern" in Nhibernate that supports this scenario?


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.