I've figured it out.... I had a many-to-one in Post which target entity had a reference to SimplePerson, and that property was not set to cascade="merge".
On 14 May, 17:24, graphicsxp <graphic...@googlemail.com> wrote: > Hi, > > I'm having the following exception when I try to save my Post entity : > > object references an unsaved transient instance - save the transient > instance before flushing: Metrica.SimplePerson > > I save my Post entity by using .Merge(). > > The property in Post which refers to SimplePerson is mapped as > follow : > > <many-to-one name="ModifiedBy" class="Metrica.SimplePerson,Metrica" > column="ModifiedBy" cascade="merge" not-null="false" /> > > The SimplePerson class is only made of a few string and int > properties, no collections of any kind. > > Does someone know what the error mean ? I mean I don't even want to > flush the SimplePerson object as it should not be saved when I save > the Post. > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---