Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Teneo: HibernateResource is not smart enough
Teneo: HibernateResource is not smart enough [message #595901] Mon, 20 November 2006 11:35
Ilya Klyuchnikov is currently offline Ilya KlyuchnikovFriend
Messages: 74
Registered: July 2009
Member
Hi

I suppose question is for Martin Taal.

My problem is that HibernateResource is not enough for me.

I can specify hsql query for resource only before loading it.
I need to load some objects into my resource during startup and then load
some other objects incrementally using Criteria or HSQL - criteria is
preferred.
Could it be as some new method like List
HibernateResource.fetchAndLoad(Criteria c) that will fetch objects from
DB, add them to resource if they are not in resource already. I need
correct adding to resource - corresponding listeners
must receive notifications about adding objects to resource.

also i nave seen that StoreResource.attached(Eobject) which is called when
for example lazy collection is fetched doesn't add loaded objects to
resource - so resource.getContents() are not equal union of loadedObjects,
modifiedObjects, newObjects - it's very inconvenient for EMF client
application.

BTW I read comments in StoreResource.load():
// fill in the resource, do not use the normal add method because it
// is possible that a child of a container is loaded, in that case
// the normal add will remove the container of the object when the
// resource is set in the child object, this issue can happen with
/ direct reads using queries.
StoreUtil.setEResource((InternalEObject) obj, this, true);
elist.basicAdd(obj, null);
attached((EObject) obj);

BUT: In my application objects are not distributed across resources - all
objects are in one resource and supposed to be added incrementally.

Also there are no containment relationships in my model.

I can implement classes for my need on my own but I suppose that my
problem is quite general problem (now or in future) - so I need some
response from you.

Thanks in advance.
Previous Topic:teneo - transient references are mapped to hibernate
Next Topic:Client/Server App with EMF and Teneo
Goto Forum:
  


Current Time: Sun Feb 28 08:09:48 GMT 2021

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

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

Back to the top