[CDO] Resolve cross references for new objects that has not been committed yet [message #1016653] |
Thu, 07 March 2013 04:23  |
Eclipse User |
|
|
|
Hi,
Since a while I converted my application to use CDO 4.0 because of the amount of data it has to handle. It all works very well however there are some problems I haven't been able to solve yet. One of them I describe below:
I am trying to understand how I can replace the EMF ECrossReferenceAdapter with something more CDO conform for my huge model. The ECrossReferenceAdapter seems to eagerly adapt itself and cause the whole model to be loaded into memory. The application blocks for several minutes.
Now, for references persisted in the database already I can use the queryXRefs of the CDOView and get all cross references:
org.eclipse.emf.cdo.view.cdoView.queryXRefs(cdoObject, EReference...)
org.eclipse.emf.cdo.view.cdoView.queryXRefs(Set<cdoObject>, EReference...)
org.eclipse.emf.cdo.view.cdoView.queryXRefsAsync(Set<cdoObject>, EReference...)
The problem I have is that new references, that weren't committed yet, are not included in the returning list of CDOObjectReferences. Only what already was committed in the database. Now I am trying to find out if I am missing to add some adapter for that, or if it already exists a similar utility method as the queryXRefs for objects created in the session but not yet committed? Would retrieving deltas be relevant for that?
Cheers Jim
|
|
|
Re: [CDO] Resolve cross references for new objects that has not been committed yet [message #1016820 is a reply to message #1016653] |
Thu, 07 March 2013 14:44   |
Eclipse User |
|
|
|
Am 07.03.2013 18:01, schrieb Jim Stanton:
> Hi,
>
> Since a while I converted my application to use CDO 4.0 because of the amount of data it has to handle. It all works
> very well however there are some problems I haven't been able to solve yet. One of them I describe below:
>
> I am trying to understand how I can replace the EMF ECrossReferenceAdapter with something more CDO conform for my huge
> model. The ECrossReferenceAdapter seems to eagerly adapt itself and cause the whole model to be loaded into memory.
> The application blocks for several minutes.
> Now, for references persisted in the database already I can use the queryXRefs of the CDOView and get all cross
> references:
> org.eclipse.emf.cdo.view.cdoView.queryXRefs(cdoObject, EReference...)
> org.eclipse.emf.cdo.view.cdoView.queryXRefs(Set<cdoObject>, EReference...)
> org.eclipse.emf.cdo.view.cdoView.queryXRefsAsync(Set<cdoObject>, EReference...)
>
> The problem I have is that new references, that weren't committed yet, are not included in the returning list of
> CDOObjectReferences. Only what already was committed in the database. Now I am trying to find out if I am missing to
> add some adapter for that, or if it already exists a similar utility method as the queryXRefs for objects created in
> the session but not yet committed? Would retrieving deltas be relevant for that?
I think it would be reasonable that the queryXRefs() "merges" the remote result with possible local changes. Please
submit an enhancement request. If you want to provide a patch for this you may want to make use of these methods:
CDOTransaction.getNewObjects() and CDOObject.cdoRevision()
CDOTransaction.getDetachedObjects()
CDOTransaction.getDirtyObjects() or CDOTransaction.getRevisionDeltas()
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.03087 seconds