Monday, November 1, 2010

Performing logical delete in Oracle ADF


In some use cases it is required not to physically delete the row from database but instead update a FLAG e.g delete_FLAG = 'Y'  to hide rows from user. So, if you are not familiar with the framework then you might take a long route to do the task which could easily be done by declarative steps.

In this post we will do the following.
  1. We will add history columns in entities.
  2. We will have a view criteria to display only DELETE_FLAG = 'N' rows.
  3. On deletion in detail table we will delete logically.
  4. We will update the History columns of Master entity as modified by and modified_date.

Download the sample code

More info in this video

Happy JDeveloping,
Zeeshan Baig


  1. thanks Baig...
    it helps me a lot...

    but i have a problem on the date...
    when i perform a delete, it didn't catch the date, but it do change the grade...

    hope that you can help me to find the solution..

    1. Can you share the code? i am not sure what you are trying to do