[CDO] Get negative version objects in CDOQuery [message #1003534] |
Mon, 21 January 2013 13:12 |
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 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 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02788 seconds