[OJB-developers] SequenceManager Autoincrement
Brought to you by:
thma
From: Bischof, R. <rai...@ed...> - 2001-10-08 14:40:55
|
Hi, I am currently trying to get one of the many new features working: The autoincrement field The docs mention that it only works for the SQL types INTEGER, CHAR and VARCHAR. But it also only works for the Java types Integer, int and String. I have mapped my primary key to the primitive type long. Since the SequenceManager is only able to return unique Strings or unique integers it can't be easily changed without interface modifications. Making a special solution for longs does not really make sense since we are out of luck with floats, MyIdClass, etc ... What about making the SequenceMgr responsible for deciding what it can handle? If the SeqMgr interface is extended with a method that can return any object we can handle all kinds of ID types. Thanks Rainer |