Längerich wrote:
Bernd "Ingrid" Laengerich wrote:
OK, I played around a little bit and overwrote the afterStore
method (empty implementation, however it never gets called!? What
am I missing? I placed a breakpoint in my code, but it never
reaches it.
OK, searching around a little bit, I found in JdbcAccessImpl:
protected void assignAutoincrementIdentityColumns(ClassDescriptor
cld, Object target) throws SequenceManagerException { // if database
Identity Columns are used, query the id from database // other
SequenceManager implementations will ignore this call
if(cld.useIdentityColumnField())
broker.serviceSequenceManager().afterStore(this, cld, target); }
sorry, I made my conclusion based on sources of latest version from SVN
(OJB_1_0_RELEASE branch, upcoming 1.0.5). There the #afterStore method
is always called (changes in JdbcAccessImpl, rename of methods) and a by
the way a new constructor for SequenceManager implementations is added.
In your case (<1.0.5) you have to change/override method
#assignAutoincrementIdentityColumns in JdbcAccessImpl too.
This seems to be the only place where this method is called directly,
except it is called via reflection.
This method is only called once, no reflection.
regards,
Armin
I will just write a refresh
method, as the locations are countable where such inserts of alien
data rows are used.
Bernd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]