This content has been marked as final.
Show 2 replies
-
1. Re: Oracle trigger auto-key generation and JBOSS BEAN auto-k
sbrbot Jan 15, 2004 8:47 AM (in response to marcoyeung)If your database is used only by your ent. application then you can disable or delete trigger generating primary key. If you have other legacy applications dealing with your database then it is not acceptable solution!
Now, why your primary keys need this continuity? Having 1,3,5 for primary keys in not problem at all! Finally, first time when you delete a row from your table you will loose your "continuity"!
If you have some special reason why you need this continuity try instead of "oracle-sequence" JBoss plugin another plugin "pk-sql" withSELECT sequencename.currval FROM DUAL
for generating PK. -
2. Re: Oracle trigger auto-key generation and JBOSS BEAN auto-k
marcoyeung Jan 16, 2004 12:14 AM (in response to marcoyeung)"marcoyeung" wrote:
thanks for your comment. actually, it is NOT that important to keep the primary key continuiyt, i just want them looks tidy at the beginning.
Now I have solved the problem by modifing my trigger to not to generate primary key if the Bean already provided one.
BTW, what is the difference between your 'pk-sql' and 'oracle-sequence'???
thanks
Marco