Hi - thanks for the reply! Is that a well-known caveat of Merge? I haven't come across the note regarding "merge is meant to be used once per session per entity" and I'm hoping that's anecdotal rather than official :) In a scenario where you have one session per web request, I can see plenty of people falling into a trap with Merge if that's the case.
My need for Merge is because I'm dealing in entirely detached entities. The rdbms model is not suitable for the rest of the application, so I'm mapping changes from models fitting the application domain to models fitting the rdbms one. Getting rid of my usages of Merge in this scenario would only possible if there's another way for NH to detect the existing persistent and new / transient objects in a single graph, otherwise if I have to figure out myself which entities need SaveOrUpdate calling in the graph working from the bottom up, that pretty much removes the point of the ORM layer for me. BTW I'm using CombGuid for everything Thanks again Alex On 15 December 2011 17:02, Jason Meckley <[email protected]> wrote: > merge is meant to be used once per session per entity. personally I would > find a way to remove the need for merge altogether. your POID for posts and > comments will also affect when the operations are executed. for example: > GUID or HiLo vs Identity. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/nhusers/-/kraF-ne6AikJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
