Hi again,

Guido Beutler wrote:



autoNaming 'true' means that OJB build a sequence name for each field-descriptor (parent class-descriptor) automatic, except the sequence name was specified in the field-descriptor
file:///E:/intellij/OJB_Experimental/db-ojb/target/doc/sequencemanager.html#sequenceName



'false' means OJB does not try to build a sequence name and if no sequence name was set in field-descriptor an exception was thrown.


If I use autoNaming=false and set a sequence name, for what OJB uses the sequence name?
Is it like a primary key and different tables are mapped to one sequence if I use the same sequence name in different class descriptors?
I'm just interested in what OJB is doing there.



Yep and when using the same sequence name for different tables made these tables 'extent aware' (a PK is unique over several DB tables).


SequenceManagerHighLowImpl use sequence-name as PK in OJB_HL_SEQ table, SequenceManagerInMemoryImpl use it in memory. When using SequenceManagerNextValImpl the used DB use a system table to map sequence-name and latest generated key.

Except SequenceManagerMSSQLGuidImpl, SequenceManagerNativeImpl these implementations do not use the specified sequence-names or try to build such names.

regards,
Armin

best regards,

Guido

regards,
Armin

* in the repository descriptors, specify the database-generated pk fields
as autoincrement='true' and with the sequence-name if you have
autoNaming='false' in the above step


* in the db table schema don't specify the database-generated fields as
identity (whatever the syntax in DB2 is for this) but as a normal non-pk
field (except for NOT NULL which should be present). Also do not connect
the sequences to the pk-fields in the database, this is done by the
sequence manager.

Tom


--------------------------------------------------------------------- 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]




---------------------------------------------------------------------
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]



Reply via email to