Another user has changed the row with primary key oracle.jbo.Key[12 ].
Try these solutions:
- make sure that you check "refresh after insert" and refresh after update" for the primary key column in you entity object.
- in the application module tab Click the Properties tab and select jbo.locking.mode. Double click the “pessimistic”value next to the property to open the field editor and type “optimistic” over the value.Press enter.
- if error still exist then you must set "refresh after insert" and refresh after update" as true for all attributes in the entity object
- another way is to execute the View Object after the commit operation to bring back updated data to ViewObject. For this we need to override the afterCommit() of ViewObject class as follows:
public void afterCommit(TransactionEvent){
executeQuery();}
5- another way to solve this error is to overide the lock() method of the EntityImpl class
public void lock() {
try {
super.lock();
} catch (RowInconsistentException e) {
refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES) ;
super.lock();
}
}
Comments
1. I checked the refresh after insert and update. It dint work so I proceeded with the 2nd point
2. In application module I already have the settings of locking mode as optimistic. So this also dint help me.
3.I checked the refresh after insert/update in all the attributes in the entity object. But still the same error is being thrown.
I am unable to solve it!! Is there anything else that I need to check ?
Any help/pointer is highly appreciated.