Hi,

I am currently experimenting with JOOQ. We currently use plain Java
for our SQL statements and we target two possible RDBMS (SQLServer and
Oracle). My experimentation is to see if I could generate a JOOQ model
which could target both possible RDBMS.

When analyzing the differences between the SQLServer and Oracle
models, I found that the Keys were weird on the Oracle version (10g,
10.1.0.2.0).

Here is a key from the Keys class on SQLServer (I manually renamed the
columns for brevity):
UC_MY_CONSTRAINT1 = createUniqueKey(
test.generated.tables.Mytable.MY_TABLE,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY3,
...
test.generated.tables.Mytable.MY_TABLE.KEY7
);

And here is the Oracle version:
UC_MY_CONSTRAINT1 = createUniqueKey(
test.generated.tables.Mytable.MY_TABLE,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY1,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY2,
test.generated.tables.Mytable.MY_TABLE.KEY3,
test.generated.tables.Mytable.MY_TABLE.KEY3,
test.generated.tables.Mytable.MY_TABLE.KEY3,
test.generated.tables.Mytable.MY_TABLE.KEY3,
test.generated.tables.Mytable.MY_TABLE.KEY3,
...
test.generated.tables.Mytable.MY_TABLE.KEY7
);

It seems that each column appears multiple time, the number being
different depending on the query (sometimes 3, sometimes 7 times...)

Note that when I run:
select * from all_cons_columns where constraint_name =
''UC_MY_CONSTRAINT1"
I only get one row per column.

Is this a known problem? Do you have an idea what is happening? Is
there a way to troubleshoot?

Cheers,
-Christopher

Reply via email to