gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] report on hibernate or mapping ( for java nuts)


From: s j tan
Subject: [Gnumed-devel] report on hibernate or mapping ( for java nuts)
Date: Tue, 29 Jul 2003 19:00:09 +1000

The hibernate library works according to the documentation and faq
available. 
It allows lazy initialization of collections – AKA one-to-many
associations ,  which is fine for
Light object loading, but the pay-back is that the proxied collections
will return null if they are 
  accessed  without a mutator operation (add or delete) . 
On the other hand, when non-lazy association loading is used, one load
of the root object 
e.g. identity will load the entire medical record for the identity ,
which is neat.
 
Cascade is useful for insert and updates.  The cascade will propogate
the update through
The associations and through other cascaded links, so the medical record
can be saved
Or updated by saving the root object – identity.
Unfortunately, this doesn’t work perfectly when there is a type cycle,
i.e clin_encounters
Points to identity as a role of provider ( that was the way it was
naively modelled  by me).
Then a deadlock occurs, as the transaction saving the identity will not
be able to complete
Whilst trying to save another identity.
One solution was to not cascade the save through the  provider identity
( which was a
debugging mistake anyway).
 
Will report more interesting phenomena of this OR mapping tool …
(for those computer behaviorists out there)..
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 4/07/2003
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]