Here is a different view to the problem.
I have a bulk export-import routine that exports all the tables into .del files for backup using SYSCS_UTIL.SYSCS_EXPORT_TABLE and SYSCS_UTIL.SYSCS_IMPORT_TABLE procedures.
The export-import worked just fine until I realized that I cannot INSERT into any of the tables that have IDENTITY columns. This is because while importing all the identity columns are filled "manually".
So, the autoincrement counter is still at 0 while there already are rows with higher values.
I worked around that issue by using 'ALTER TABLE columnName ALTER COLUMN columnName RESTART WITH (current_max + 1)'.
But this proves that the current derby behavior is misleading if not wrong (no matter what the specs suggest). Derby SHOULD generate a unique id value.
I am pretty sure that, for someone who is familiar with the code fixing the bug will be quicker and less painful than continuing with this debate.
Thanks
-Ateesh
- RE: "generated by default" question Ateesh_Verma
- RE: "generated by default" question derby
- Re: "generated by default" question Vic Ricker
- RE: "generated by default" question Michael Segel
- Re: "generated by default" question Daniel Noll
- Re: "generated by default" questi... Michael Segel
- Re: "generated by default" q... Daniel Noll
- Re: "generated by default&quo... Michael Segel
- Re: "generated by default&quo... Vic Ricker
- Re: "generated by default... Michael Segel
- Re: "generated by default" question Vic Ricker
