this worked in my situation, but the entities I was saving where children of a parent entity that was resolved from session. so the context is slightly different. In your situation it sounds like the entity with the assigned id is the root.
You know it's an insert only model, but NH doesn't know that, so it needs to check if it exists. There may be a mapping/configuration setting that prevents load before save, or prevents updates, but I not 100% sure about that. If that doesn't work (or exist) I would change the POID strategy to allow NH/DB to handle it. If the assigned ID has business meaning, then map this as an immutable attribute of the entity. Another option is to drop the use of NH altogether. I haven't used event sourcing myself, but what little I understand it suppose to simplify persistence concerns. If that's the case then NH or an RDBMS wouldn't be required. -- 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.
