I am using JDeveloper 18.104.22.168.0 using ADF. I would like to insert a row into Table B when Table A is being inserted into the database based on a value selected by end user. I could do this in a database trigger but I would like to try in ADF. I think the best place to do it would be in the entity class based on Table A . I could override the doDML method and check for DML_INSERT
and do the insert of table B there, but I don't know the best way to accomplish this. I assume I want to avoid using a SQL "Insert" statement. I am new to ADF and it can be difficult to convey
a question using the proper terminology. I hope this makes sense.
I would create a view object for insert only (see tuning section in VO wizard). Then you could write an appilcation module method that does the insert using the view object. You could call this method in your entity class in the doDML method just as you wrote above. Is this clear or do you need more explaination?
I am not sure if it is okay to use the application module in your entity, but I don't know how else this can be done.