Thursday, May 31, 2007

http://d5.allthingsd.com/20070530/video-steve-jobs-and-bill-gates-prologue/

the public "Conversation"  from all things digital.

5/31/2007 12:32:55 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, May 29, 2007

Note to selves:

http://www.hibernate.org/hib_docs/nhibernate/html/manipulatingdata.html#manipulatingdata-interceptors

This may be promising for an audit trail in the future.  Particualrly on nhibernate side of things.

 

 

5/29/2007 10:00:39 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, May 28, 2007

We should perhaps look at some of these best practices:

http://www.codeproject.com/aspnet/NHibernateBestPractices.asp#WEB

I particularly think the NHIbernate settings in the web config (for skchase int the hiebrnate.cfg)  would be worthwhile.

5/28/2007 4:54:15 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, May 11, 2007
5/11/2007 8:53:29 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, May 08, 2007

Another NHibernate tip:

the follwoing error occurs: "Object references an unsaved transient object - save the transient instance before flushing: Object"

when a new (unsaved) object is added into the collection of objects in a parent class and SaveOrUpdate is callled on teh parent.

EG.  A seller has a collection of categories and each category has a collection of vouchers. Adding a Voucher to a category and calling SaveOrUpdate on the parent Seller. 

To resolve this error ensure that in teh mappniog file the "cascade" is set for each of the properties.  so in.

here is the mapping file segment:

<bag name="Vouchers" table="Vouchers" inverse="false" cascade="all-delete-orphan">

<key column="CategoryID" />

<one-to-many class="Voucher" not-found="ignore" />

</bag>

NB. all-delete-orphan is cascade all save or updates and delete any recordds that are then orphaned due to the parent being deleted.  this is not default behaviour if you just cascade all.

5/8/2007 4:05:41 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |  Trackback