I know the problem: The dirty check. It has to loop all individual bytes. A work around would be to use your own type.
Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Thu, Jul 23, 2009 at 7:29 PM, jc_lvngstn <[email protected]>wrote: > > I have a situation where updateing/inserting a binary object of about > 300k in a sql database takes so long (20+ minutes) that I have to end > the program. Loading the data is fairly quick, however. > My classes look like this: > > Parent > { > public virtual Guid Id {get;set;} > Thing {get;set;} > } > > Thing { > public virtual Id {get;set;} > public virtual byte[] Data {get;set;} > } > > Parent.hbm.xml: > Here is the xml where I declare Thing property information for Parent > > <many-to-one name="Thing" > class="Thing" > column="ThingId" > cascade="save-update" > lazy="proxy" /> > > In the SQL database, the Parent table contains a ThingId column with a > guid that references the Id of that particular Thing in the Thing > table, so it's really a one-to-one mapping. > > I'm somewhat new to nHibernate, any suggestions would be very > welcome. > > Thing.hbm.xml looks like this (without the header portion) > > <class name="Thing" > lazy="true"> > <id name="Id"> > <generator class="guid" /> > </id> > <property name="Data" column="Data" type="BinaryBlob" > length="2147483647" /> > </class> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
