Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO-Hibernate-Teneo
CDO-Hibernate-Teneo [message #615388] Mon, 04 February 2008 10:13
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
I have started to integration with the teneo mapping generator. For this I have created an interface
HibernateMappingGenerator and an implementation (TeneoHibernateMappingProvider) in a separate plugin.
I have changed the structure of the hibernate store, mainly that the handling of cdopackages is done
using a separate sessionfactory.
The initialzation is now a two-step procedure: 1) initialize the package sessionfactory/store, 2)
read the cdopackages from the database and generate the mapping.
I moved the code for handling (reading/writing) cdopackages to a separate class. This made the
hibernatestore code and initialization a bit cleaner.

I started to work on the unsupportedexceptions. My first one is related to the method:
HibernateStoreWriter.primeNewObject. This method gets a class and returns a new cdoid object. Is
this method for new objects which need to be persisted?
I also noticed that the first object which is persisted is a resource object. You mentioned before
that resources are persisted. What is the (database) model for a resource? In your opinion, should
this be added to a static cdo hibernate mapping (meta.hbm.xml)?

Hibernate works best if each type (eclass) also has a version feature for handling optimistic
locking. It also uses the version property to detect if an object is new or not. In your testmodel
there is no version feature and not all types have a feature which can be used for the id. Do you
agree that I create a separate testmodel which contains this info together with some teneo
annotations? It can be a copy of model1.

Btw, I think you detect that an object is new by looking at the cdoid, correct? Maybe we can use
that in hibernate to detect 'new-ness' instead of the version feature.

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[Teneo] Retrieving the teneo version at runtime
Next Topic:CDO-Hibernate-Teneo
Goto Forum:
  


Current Time: Mon Sep 21 10:37:20 GMT 2020

Powered by FUDForum. Page generated in 0.01620 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top