Move from preUpdate to onFlush

preUpdate event is actually not able to change relation, which is our
case with new InventoryUnit in relation with OrderItem. PreFlush allows
that.
Merge pull request #1174 from winzou/fix/item

[Core] Move from preUpdate to onFlush