I've got master-detail relationship mapped on both sides; the parent has a list of children, the child a single reference to the parent. When a new child is added, it is added to the parent's list, but in the "real" (database) world there naturally is only a foreign key from the child to the parent.
When persisting this, the preUpdateWithChanges event is fired on the parent. This confuses me, there is nothing to update on the parent.
And Eclipselink actually does not update anything if left alone, but I use this event to set a "who'd done it" field, which results in there being something to update, and I get an update just setting the who and version field. And as a consequence I get a lot of history records containing only a changed who'd-done-it field.
Why is the preUpdateWithChanges event fired when in fact there isn't anything to write to the database?