I am suffering a weired issue.
I used APEX 4.0 long time ago (may be 8 years)
Now I am trying to build some fast app with APEX 19.1 and start from some easy practice.
I create a master record (Z_ORP_LIST)
PK: OPRID (operator ID)
other columns: OPR_EMPLID, EMAIL
a detail record:Z_OPR_ROLE
PK: OPRID, ROLE_ID
and OPRID is a referrence key (FK) from master record.

I created a master detail form step by step following the guide.


and get an UI as below: when I choose different row in master, detail would prompt correct mapping details.

BUT when I add new row for detail,
the value of PK is NOT set properly.

Any help would be greatly appreicated.
I struggled very much. I download master detail sample
https://apex.oracle.com/pls/apex/f?p=4750:81:13011441661668:::81:P81_ID,P81_APP_TYPE:7860,DATABASE
If you remove a detail ( such as Task) and add it back, you would get a same ISSUE!!!
https://apex.oracle.com/pls/apex/f?p=4750:81:13011441661668:::81:P81_ID,P81_APP_TYPE:7860,DATABASE