Skip to main content


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 13:12 Go to next message
Paco Blanco is currently offline Paco BlancoFriend
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 13: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 13:29 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
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: Fri Apr 26 20:44:42 GMT 2024

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

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

Back to the top