Both new records, Master and Detail, now can be commited together: Just make sure you didn't forgot to set DBSequence type for Primary Keys in your Entities. With strong association, framework automatically will ensure correct foreign key value propagation for Detail record:Īnd there is no additional changes, Create functionality now will work for both - Master and Detail in the same transaction. By selecting this option, you will force framework to use so called strong association between two Entities. You just need to open Entity Association wizard for those Entities involved into Master-Detail relationship:Īnd basically to select one checkbox in Behavior group, this checkbox is Composition Association. However, there is one feature in Oracle ADF, that helps to solve described problem. When user will try to close transaction by committing new records from Master and Detail, integrity constraint violation error will be thrown by database:įrom my practice, its quite common problem and many developers are facing this. There will be no value for foreign key, because Master record is still not committed and sequence number is not assigned for Master record primary key. There will be a problem, because framework will try to commit Detail record without any value for foreign key. But you will face a problem, when user will try to insert Master and Detail record during the same transaction:
![scriptcase multiple record form master detail checkbox scriptcase multiple record form master detail checkbox](https://cdn2.scriptcase.net/samples/img/systems-screenshots/225.jpg)
![scriptcase multiple record form master detail checkbox scriptcase multiple record form master detail checkbox](https://www.scriptcase.net/it/documentazione/en_us/v9/assets/images/docs/app/form/paginas_configuracao.png)
Let's say you are implementing functionality to allow users to insert data into Master and into Detail, its fine - you can just drag and drop Create or CreateInsert action from Data Control. However, there is one thing you should know, especially if you are new to ADF. Actually, its very easy to implement Master-Detail in ADF, the same is for Create operation.
![scriptcase multiple record form master detail checkbox scriptcase multiple record form master detail checkbox](https://forum.scriptcase.net/uploads/default/optimized/2X/4/4b6dba31027732a20bb527a1c20525314d07d017_2_690x260.jpeg)
Its very frequent requirement in Oracle ADF applications, when developer needs to implement Master-Detail relationship with Create functionality.