Firstly... Many thanks for this awesome library, it saved me a lot of time.
Secondly I'd like to report incorrect (in sense of being different from other iterators in Java library) behaviour of iterator that is returned by the iterator() method of EagerForeignCollection.
The problem occurs when I iterate some ForeignCollection and call remove(). Every time I call remove, the next call of next() results in skipping one record.
Let's say I'd like to delete all records using iterator:
for (Iterator<SomeEntity> iterator = fCol.iterator(); iterator.hasNext();) {
SomeEntity SomeEntity = (SomeEntity) iterator.next();
iterator.remove();
}
After this being executed, only entities with odd indices (1,3,5...) are removed. When I use this example with an ArrayList it leads to empty list.