cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Lux <>
Subject Re: Query on uncommitted DataContext
Date Sun, 26 Apr 2009 12:06:00 GMT

Well, ok .. completely blind :)

But however, I tried to use it and figured out that it isn't the right
solution for the problem. In the meantime I solved it by decorating
DataContext and suppliying a performQuery() method that automatically adds
all new objects to the result list and also removes deleted objects from it. 

Some time ago I used to work with EOF and I have in mind that this behaviour
was the default. So I thought it could be accomplished in Cayenne, too. But
that apparently isn't the case.


Robert Zeigler-6 wrote:
> ? It's still there:
> filter and filterObjects are both very much alive and well, but note  
> that it's filterObjects, rather than filterObject.
> Robert
> On Apr 25, 2009, at 4/2512:27 PM , Markus Lux wrote:
>> Hi,
>> I've got a problem regarding queries on uncommitted DataContexts  
>> containing
>> new or deleted objects. If I insert a new object into a DataContext  
>> using
>> newObject(), this object won't show up in a SelectQuery. The result  
>> of this
>> query contains only persistent objects from the database but  
>> excludes the
>> new, uncommitted object. The same behaviour applies to the  
>> counterpart:
>> deleted, uncommitted objects will show up in such a query.
>> I did a bit research on that problem and stumbled upon an older post  
>> in this
>> mailing list where it has been suggested to use  
>> Expression.filterObject() to
>> accomplish a similar behaviour. Since this method is not present  
>> anymore, I
>> guess that it had been removed in Cayenne 3.
>> So how do I include/exclude the aforementioned, uncommitted objects  
>> in a
>> query?
>> Thanks, Markus
>> -- 
>> View this message in context:
>> Sent from the Cayenne - User mailing list archive at

View this message in context:
Sent from the Cayenne - User mailing list archive at

View raw message