Hi,

I'm not able to create tables (OJB tables) and modify the column names, so I cannot use "SequenceManagerHighLowImpl", then I changed to "SequenceManagerNextValImpl" hopping it would work. Unfortunatlly, it's not working, but I discovery 1 problem, and I'd like to know how it would be handled.

If I call "store" method, OJB update 0 id, in fact, in the first time, when 0 id does not exists, it inserts, after that, always updates.

Id attribute is inicialized by 0 when my class is instanciated. How would I inform that 0 is not be updated, but always inserted instead in the next id value?

Regards,
Rog�rio

Armin Waibel wrote:

Hi,

Rogerio Tambellini wrote:

It still not working... :-(
Do I have to implement a store procedure and create OJB tables like OJB_NEXTVAL_SEQ?


SequenceManagerHighLowImpl use a DB table called OJB_HL_SEQ to manage the keys, but this table is part of the repository_internal.xml, thus you should generate it. More info about the OJB specific table can be found here http://db.apache.org/ojb/platforms.html

If you read the sequence manager doc
http://db.apache.org/ojb/sequencemanager.html
you can find other sequence manager implementations. One of this implementations use stored procedure to manage keys.


You can to to use *SequenceManagerInMemoryImpl* for your test. This implementation doesn't need any database tables.

Superfluous to say, do not define column "CdEmp" as Identity column (to use Identity columns you have to use SequenceManagerNativeImpl).

regards,
Armin



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to