On Tue, 6 Apr 2004, Guido Beutler wrote: > Can I choose the sequence implementation per class? > There are only a few tables which uses DB sequences. For all other > tables the NextValImpl is ok. > The problem is that only a few tables use DB sequences.
Nope, currently not, though for an application you should choose how the pk values are generated, and stick to this method for all tables, anyway. So if you have a mixed scenario where some pk values shall be generated by the database (sequences), and other come from the application, then I think you probably should use the NextValImpl like this (Armin, please correct me if I got it wrong): * specify NextValImpl in your connection descriptor with autoNaming='true' if you only need one sequence, or with autoNaming='false' if you require multiple sequence * 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]
