Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Get negative version objects in CDOQuery
[CDO] Get negative version objects in CDOQuery [message #1003534] Mon, 21 January 2013 08:12 Go to next message
Paco Blanco is currently offline Paco Blanco
Messages: 28
Registered: June 2012
Junior Member
CDOQuery cdoQuery = cdoView.createQuery(...);
cdoQuery.getResult();

The result is a QueryResultList instance.
I know and want to get some elements of the query that have a negative version (not existent at current time) but all getting methods of QueryResultList adapt each not existent object from a CDOIDObjectLongImpl instance to null due to an internal try/catch of ObjectNotFoundException.

Is there some way to obtain the CDOID/proxy (like CDOIDObjectLongImpl) of these deleted objects from the CDOQuery??

[Updated on: Mon, 21 January 2013 08:14]

Report message to a moderator

Re: Get negative version objects in CDOQuery [message #1003542 is a reply to message #1003534] Mon, 21 January 2013 08:29 Go to previous message
Eike Stepper is currently offline Eike Stepper
Messages: 5499
Registered: July 2009
Senior Member
Am 21.01.2013 14:12, schrieb Paco Blanco:
>
> CDOQuery cdoQuery = cdoView.createQuery(...);
> cdoQuery.getResult();
>
>
> The result is of QueryResultList object type.
> I know and want to get some elements of the query that have a negative version (not existent at current time) but all
> getting methods of QueryResultList adapt each not existent object from a CDOIDObjectLongImpl instance to null due to
> an internal try/catch of ObjectNotFoundException.
>
> Is there some way to obtain the CDOID/proxy (like CDOIDObjectLongImpl) of these deleted objects from the CDOQuery??
As objects with a negative version (in auditing mode) are deleted you can't use the (default) object query.
org.eclipse.emf.cdo.server.internal.db.SQLQueryHandler.executeQuery(CDOQueryInfo, IQueryContext) explains how to use the
"cdoObjectQuery" query parameter to suppress the ID-->object conversion.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[GWT] Server-side XMLResource
Next Topic:[CDO] Different object was registered for OID:http://example.com#MyType#c09f11a0-
Goto Forum:
  


Current Time: Sat Aug 23 05:47:32 EDT 2014

Powered by FUDForum. Page generated in 0.02768 seconds