Composition/Association Editor SQLIntegrityConstraintViolationException

I have 3 entities: Master, Detail, Subdetail. The relationship between Detail and Subdetail is one-to-one. Master has a composition attribute of Details. I am using the standard editor UI for Master. However, I wanted to edit both the Detail and the Subdetail on the same editor. I created the combined editor and added the appropriate Create/Edit Actions to the table of Details on the Master editor page. The Detail/Subdetail editor opens fine, I am able to edit the information, and I can hit ‘OK’ and return to the Master editor page just fine. But when I try to hit ‘OK’ on the Master editor screen, I got this error: “SQLIntegrityConstraintViolationException: integrity constraint violation: unique constraint or index violation; SYS_PK_12197 table: SAMPLE_SUBDETAIL”

What would be causing this? I know it is possible to have an editor that can edit both the Detail and Subdetail entities at the same time because I have successfully created an editor that can work with a similar Detail/Subdetail one-to-one relationship, the only difference being that there was no Master entity above the Detail in the hierarchy. What about the Master/Detail composition would cause the above error?

Well, I accidentally stumbled onto my problem. The Subdetail was not added as a datasource on the Master edit screen. So, hopefully this helps someone.