In a scenario such as Customers - Orders - Order Details, have have many people creating Customer records independently. There are now duplicates of companies that users have created that people would like to merge together into one (the proper) record. Historically, I have used Session.CreateSQLQuery(" ... ") to do migrate the old record to the new one and then delete the old one. But, as we add to the object graph, the method for merging them gets to be laborious and a task where it is often forgotten until we are receiving "
No row with the given identifier exists" exceptions because of something we have forgot to add to the series of update statements. I am wondering if there is a native mechanism within NHibernate to merge the two records into a single one that would take care of all the cascading across the object graphs?
TIA,
JH