Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Collection returns contains = false for Query loaded object.
[CDO] Collection returns contains = false for Query loaded object. [message #1387016] Mon, 23 June 2014 13:45 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

We experience this strange thing, that collection.contains(Object) =>
false, when the Object was retrieved with a Query. How do we force the
loading of the object on the collection? When debugging the collection,
the collection.contains(Object) => true, as the debug/variable view will
read the object and it will be resolved (I suspect this).

Is this a known issue, how do I force loading a collection when we
obtain objects from a query?

Thank You,
Christophe
Re: [CDO] Collection returns contains = false for Query loaded object. [message #1387017 is a reply to message #1387016] Mon, 23 June 2014 13:48 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Actually, even better would be if we can execute query delete statements
with CDO, which would enable us to skip the part which does the contain
check.

On 23-06-14 15:45, Christophe Bouhier wrote:
> Hi,
>
> We experience this strange thing, that collection.contains(Object) =>
> false, when the Object was retrieved with a Query. How do we force the
> loading of the object on the collection? When debugging the collection,
> the collection.contains(Object) => true, as the debug/variable view will
> read the object and it will be resolved (I suspect this).
>
> Is this a known issue, how do I force loading a collection when we
> obtain objects from a query?
>
> Thank You,
> Christophe
Re: [CDO] Collection returns contains = false for Query loaded object. [message #1387020 is a reply to message #1387017] Mon, 23 June 2014 13:57 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
We solved it by not doing a contains(), but just calling remove([CDO
query loaded object]), which works.

=> Soooo, to conclude ".contains([SQL obtained object]) considered
harmfull with CDO!"


On 23-06-14 15:48, Christophe Bouhier wrote:
> Actually, even better would be if we can execute query delete statements
> with CDO, which would enable us to skip the part which does the contain
> check.
>
> On 23-06-14 15:45, Christophe Bouhier wrote:
>> Hi,
>>
>> We experience this strange thing, that collection.contains(Object) =>
>> false, when the Object was retrieved with a Query. How do we force the
>> loading of the object on the collection? When debugging the collection,
>> the collection.contains(Object) => true, as the debug/variable view will
>> read the object and it will be resolved (I suspect this).
>>
>> Is this a known issue, how do I force loading a collection when we
>> obtain objects from a query?
>>
>> Thank You,
>> Christophe
>
>
>
Previous Topic:[EMF databinding] bind specific element in an EList by index
Next Topic:Custom validation for ID attribute
Goto Forum:
  


Current Time: Thu Mar 28 20:58:19 GMT 2024

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

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

Back to the top