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.
Markus
Robert Zeigler-6 wrote:
>
> ? It's still there:
>
> http://cayenne.apache.org/doc/api/org/apache/cayenne/exp/Expression.html
>
> 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:
>> http://www.nabble.com/Query-on-uncommitted-DataContext-tp23234428p23234428.html
>> Sent from the Cayenne - User mailing list archive at Nabble.com.
>>
>
>
>
-- View this message in context: http://www.nabble.com/Query-on-uncommitted-DataContext-tp23234428p23241592.html Sent from the Cayenne - User mailing list archive at Nabble.com.
This archive was generated by hypermail 2.0.0 : Sun Apr 26 2009 - 08:06:37 EDT