Tuesday, December 22, 2009

Composition Association and Locking (Fixed in

We had a lot of locking problems in our ADF application even though we use optimistic locking.

We found out that it was caused by composition Association and Lock Top Level Container Option.
This is the default way the association is generated by the wizard when the foreign key constraint in database is cascade.
In my test case I set it by hand to reproduce in Department Employees relationship.

The master Entity Table in database is locked every time you create a new record in the detail composed entity.
This is happening when creating detail data and not when posting data as in optimistic locking
This does not happen when you update or delete data from detail entity.

Is this a bug?

If pessimistic mode of Application Module is not a good practice for Fusion Applications then composition Association Locking should also be not.

Composition Association is a rule to prevent details to exist without a master. But this is also prevented if the foreign key attribute in detail entity is required. So I also don’t see the usage of composition association.

Test Case:


  1. Why its a bug? :) Its just to ensure correct CRUD operation behavior in Master-Detail. You can remove it, if its not needed... Keep in mind - its Productivity with Choice ;-)


  2. You *can't* remove it in 10.1.3.x (jdev
    Everytime you're trying to disable "Lock Top-Level container" in assoc of a fk, it's not gonna be saved.

  3. you can set none option maybe it will work
    i also met the same problem good luck!