Hi Matt,
This is a bug. I created a unit test that reproduces it. Condition that
triggers the exception is that "validateForSave" in one of your
DataObjects indirectly modifies the ObjectStore during the iteration
(e.g. by inserting new objects or doing a fetch).
I opened a bug report:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-146
This will be fixed in M7, which is just around the corner.
Andrus
On Jun 13, 2004, at 3:33 PM, Matt Kerr wrote:
> i have a code path which "used to work".
> and now i'm receiving the vague ConcurrentModificationException
> (stack trace below)
>
> i think i've triple checked those entities in my model,
> and have stared at the generate sql.
> i emptied the table, so i really confused what the snag is-
> i'm only trying to save a handful of objects.
>
> i see this reference post ...
>
> http://www.objectstyle.org/cayenne/lists/cayenne-user/2003/11/
> 0028.html
>
> i'm running OSX 10.3.4 w/mysql 4.0.16-standard, and cayenne 1.1M6
> is that relevant?
>
>
> any suggestions greatly appreciated.
> thanks,
> matt
>
> ~~~
> java.util.ConcurrentModificationException
> Stack Trace:
> * java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
> * java.util.HashMap$ValueIterator.next(HashMap.java:812)
> *
> org.objectstyle.cayenne.access.ObjectStore.validateUncommittedObjects(O
> bjectStore.java:856)
> *
> org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
> va:1211)
> *
> org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
> va:1187)
> *
> com.sophora.processing.pages.MoreTasksMenu.updateMonthlyActivityAction(
> MoreTasksMenu.java:126)
> 8<
>
>
This archive was generated by hypermail 2.0.0 : Sun Jun 13 2004 - 18:03:29 EDT