Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Abstract classes in top entities
[Teneo] Abstract classes in top entities [message #615546] Sat, 23 February 2008 11:38
André Lahs is currently offline André LahsFriend
Messages: 4
Registered: July 2009
Junior Member

I am currently investigating Teneo with Hibernate. Especially the lazy
loading possibilities are very interesting for me.

My meta model is quite simple. There is a model class which contains
packages and packages can also contain packages. Both model and package
classes extend an abstract class namedElement. On resource loading I
expected the containment references to be lazily loaded.

While testing I noticed that all objects (model and packages) were loaded
on initial resource loading. First, I thought it was an configuration
issue. But it wasn't. I debugged the HibernateResource and found out, that
it loads all "topEntities" at once. The problem is, that all objects of
type namedElement where recognized as topEntities, since namedElements are
not contained by any other class. For this reason all packages where
loaded immediately.

After changing the computeTopEntities() method of HbDataStore class, it
worked the expected way.

protected String[] computeTopEntities() {
final ArrayList<String> result = new ArrayList<String>();
for (Iterator<?> pcs = getClassMappings(); pcs.hasNext();) {
final PersistentClass pc = (PersistentClass);
if (topEntity && !pc.isAbstract()) { // added not abstract condition
return result.toArray(new String[result.size()]);

Is there another possibility to control the topEntities computation?

Are there any drawbacks with the solution above? Otherwise I would
suggest, that this becomes the default behavior.

With regards, André
Previous Topic:[Teneo] Is there a way to separate notation that define column length?
Next Topic:[Teneo] Abstract classes in top entities
Goto Forum:

Current Time: Mon Jun 27 12:33:02 GMT 2022

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

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

Back to the top