According to the 2.1 documentation, the event return value should "Return true if the operation should be vetoed".
On Oct 14, 8:37 am, PLen <[email protected]> wrote: > Hello, > > I am using NHibernate 3.0 Alpha2 with .Net 3.5. I am using both the > OnPreInsert event of the IPreInsertEventListener and the OnSave of the > EmptyInterceptor. Both methods return a bool but I can't find any > references to what the bool return value is supposed to represent. I > am asking because I am checking each of my objects before they are > added to the database to see if its main content (a byte[]) is over a > certain size. If it is, I don't want it to be save in the database. > This is because NHibernate is throwing an OutOfMemoryException when it > encounters an object (in my list of hundreds or even thousands of > objects) where the byte[] is over a certain size. I don't know what > the cutoff point is but I believe it is in the single digit MB realm. > So, I want to inspect my object in either the OnSave or OnPreInsert > methods and if the byte[] is over a certain size, tell NHibernate to > forget this object. I thought the bool return value may represent > whether to NHibernate should continue with the current object, but > that doesn't seem to be the case. > > Any thoughts? > > Thanks - Peter -- 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.
