|Teneo: HibernateResource is not smart enough [message #595901]
||Mon, 20 November 2006 11:35
| Ilya Klyuchnikov
Registered: July 2009
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
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
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);
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.
Powered by FUDForum
. Page generated in 0.01449 seconds