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?
|