Hi Mike,

 

I’m not aware of any other effort to do this. It should be straightforward, however, given the architecture of HB3.

 

Gavin

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Kanaley
Sent: Friday, 3 June 2005 9:35 PM
To: hibernate-devel@lists.sourceforge.net
Subject: [Hibernate] Hibernate and EMF integration

 

Unfortunately, there are integration problems when trying to persist Eclipse EMF objects with Hibernate.

 

A model architect uses an EMF class diagram (much like a UML class diagram) to model the data in the application.

From this diagram, EObjects are generated. EObjects are EMF’s form of POJOs.

EObjects are more complex than POJOs – they actually know about the model and support lazy loaded collections built into the generated objects.

 

Why not just use POJOs with Eclipse?

Eclipse provides a framework on top of EMF that provides:

-        XMI serialization

-        Generated code based on EMF to support refactoring

-        Cross-file reference resolution when serializing out a model to multiple files in a file system.

-        Out of the box Eclipse editors for EMF objects (not that important since we are unlikely to ship these basic editors).

 

I won’t go into the details of integration issues in this email message. A short summary are:

- UserCollectionType instances cannot be instantiated with knowledge of the “owning” instance.

- EMF EObjects only support get methods for all collections. All collections are represented by an EList in EMF.

- EMF’s lazy loading needs to delegate to Hibernate’s lazy loading

 

Small modifications to Hibernate are required to implement this support (as well as PropertyAccessor and UserCollectionType extensions).

 

TIBCO is not alone in this search as indicated in the thread below where someone has this working with JDO.

http://www.jpox.org/servlet/forum/viewthread?thread=1802

However, TIBCO does not want to use a proprietary ORM library and we would rather use Hibernate than JDO.

TIBCO wants to have an open source solution to this problem which is why we are approaching you.

 

Are you aware of others trying to integrate Hibernate and EMF?

TIBCO will provide the implementation resources but would like a Hibernate team liaison

to review the design with a long term goal of having Hibernate support this functionality.

 

Thanks for your time,

Michael Kanaley

Principal Architect

TIBCO Software Inc.

 

Reply via email to