Greetings
After knowing and liking H2 for some time now, I finally started using
it for developing the next/final version of my SQL abstraction
framework.
Worked all quite well so far, but today I encountered a problem.
I searched the web and this group prior to posting, but didn't find an
answer (obviously).
The problem is a suspicious error message for the combination of a
FOREIGN KEY definition and the default schema.
On an empty database:
While this works:
CREATE TABLE T1 (
col1a INT, col1b INT,
)
CREATE TABLE T2 (
col2a INT, col2b INT,
FOREIGN KEY (col2a , col2b) REFERENCES T1(col1a, col1b)
)
This will cause an error:
CREATE TABLE T1 (
col1a INT, col1b INT,
)
CREATE TABLE test.T2 (
col2a INT, col2b INT,
FOREIGN KEY (col2a , col2b) REFERENCES T1(col1a, col1b)
)
The error message is:
Table "T1" not found
It seems like H2 can only handle the default schema when defining a FK
if the table owning the FK is in the default schema itself.
Is this intentional? Seems like a bug to me.
H2 version is 1.3.160 (2011-09-11)
default schema is unchanged (actually no changes made at all since the
installation)
server mode
no syntax compatiblity mode
don't know what else to supply
Thank you for any helping answer :)
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.