bad bug in mgmt of DBTransactionImpl.mIsDirty
Hi,
I'm using JDeveloper 9.0.3 release (build 1035).
I was attempting a theoretically simple thing - identify if there were changes in my application module since the last commit/rollback. I was thinking that calling DBTransactionImpl.isDirty() for the AM's transaction should be enough. Which seems completely false!
Details: I implemented a JUPanelValidationListener, which I installed on the panel binding. When I make a call to JUPanelBinding.isTransactionDirty() in my implementation of JUPanelValidationListener.beforeCurrencyChange() following an attempt to insert a new row, I ALWAYS get TRUE.
More details: I extended prepareSession() in my AM class, in order to call getDBTransaction().setTrackNewAndModifiedRowsOnly(false). Furthermore, I only use populateAttribute() in the extended create() methods of my entities, and not setAttribute(). All these, in order not to "dirty" myself the transaction...
Anyway, it never gets the chance of reaching so far. DBTransactionImpl.mIsDirty is set to TRUE in DBTransactionImpl.addTransactionPostListenerNoCheck(), which is called from ViewObjectImpl.createInstance() - EntityImpl.initDefaults() - EntityImpl.setState(), so way before EntityImpl.create() gets a chance of being called.
This bug is quite blocking, as I lack ideas as of how I could really get the information that I need from the framework, as long as I don't have the appropriate entry points...
Is there a workaround? I really doubt, as the framework itself does not have the information that I need. My belief is that there are some conceptual errors in the way the framework is designed to manage the "transaction dirty" property. And, generally speaking, "object dirty"... (transactions, entities, view objects, etc.)
Anyway, I'm waiting for any reasonable suggestions.
Thanks,
Adrian