Copied and directly related to issue
When using the following DbEntities:
IV_OTHER (id, name)
IV_BASE (id, type, name)
IV_IMPL (id, attr1, attr2, other1_id, other2_id) (vertically inherits IV_BASE)
all fields are non-null
We end up with ObjEntities:
IvImpl extends IvBase
When running the following code:
Committing this errors in the database, because its trying to insert into the IV_IMPL table with a NULL value for OTHER2_ID
The original issue (and test) was referring to an Entity that only had 1 flattened relationship. I recently had to add another relationship to this Entity, and discovered the same bug pops up again. This time its because the new code does not handle merging the flattenedArcKeys if more than one exists per ObjectId.
I will upload the breaking test shortly.