I am in struggling with Pre-Update event listener and have similar issues with updating one of the properties. This post might help you.
http://ayende.com/Blog/archive/2009/04/29/nhibernate-ipreupdateeventlistener-amp-ipreinserteventlistener.aspx On Nov 25, 8:30 pm, Revin <[email protected]> wrote: > Hi all, > > I have an entity where the ID is not generated automatically but it is > assigned by user. > > <id name="Id" column="ID" type="string" access="nosetter.camelcase- > underscore"> > <generator class="assigned" /> > </id> > > I tried to generate the ID using event listener > IPreInsertEventListener without any success. > Is my approach possible? > > It seems that in the event listener, the ID cannot be assigned to any > value. > - The ID is not in the event.State > - The event.Id cannot be set using reflection. > > Thanks for your help. > Revin. -- 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.
