Joined: Fri Mar 05, 2004 3:05 pm Posts: 1 Location: TORONTO
|
Hi,
I have two problems when implementing Hiberate (2.1) in my app.
1) I have an Oracle 9i table with a PK column of VARCHAR2(10). Basically this column contains order Id and it must contain only digits. Order numbers are created sequentially and left-padded with 0. Can "increment" be used in this case (the hibernate documentation indicates that the column must be int or long) ? If not, what other alternatives are available ?
2) Another table similar to (1) except that the ID must be prefixed with a three-character prefix "OMC". The rest of the ID characters are digits and must be sequential. What generator class should be used ?
I have searched the doc and this forum but cannot find any hint on these problems.
Thanks in advance
|
|