Hi Scott,
Finally I am back, so I've got a chance to look at your solution. See
my comments below.
On Tuesday, July 29, 2003, at 02:46 PM, Scott Finnerty wrote:
> I made the change I described to DataContext.hasChanges() and it solved
> the problem. No one has commented on whether it is the right place to
> solve this issue of transactions consisting only of flattened
> relationship modifications not working.
> Is it as simple as combining the result of ObjectStore.hasChanges()
> with
> looking at DataContext.getFlattenedInserts (and Deletes?) in
> DataContext.hasChanges()? As in:
>
> return ((this.getFlattenedInserts().isEmpty() == false)
> || (this.getFlattenedDeletes().isEmpty() ==
> false)
> || objectStore.hasChanges());
>
> Or should ObjectStore.hasChanges() return the "right" thing based on
> properties and relationships....?
Correct, the "right" thing would be to track such things at the
ObjectStore level. But this will require to do another "right" thing
:-) - namely moving flattened relationship tracking to the ObjectStore
as well. So for now (1.0) I suggest keeping your solution for
simplicity. I will write a few unit tests and commit you fix shortly.
Thanks!
Andrus
This archive was generated by hypermail 2.0.0 : Fri Aug 29 2003 - 11:00:38 EDT