Hi,

> http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database

Thanks a lot! I will have a look at the problems and try to solve them
one by one.

"id and version of a content instance as the primary key and rely on
references to the id"

This is expected behavior, you would also get an exception on
PostgreSQL, Derby, and HSQLDB (I didn't test other databases).

drop table parent;
drop table child;
create table parent(a int, b int, primary key(a, b));
insert into parent values(1, 1);
insert into parent values(1, 2);
create table child(c int, foreign key(c) references parent(a));

H2: Unique index or primary key violation: CONSTRAINT_INDEX_8  ON
PUBLIC.PARENT(A)
PostgreSQL: ERROR: there is no unique constraint matching given keys
for referenced table "parent" 42830/0
Derby: Constraint 'SQL081208162825440' is invalid: there is no unique
or primary key constraint on table '"SA"."PARENT"' that matches the
number and types of the columns in the foreign key.
HSQLDB: Primary or unique constraint required on main table

"insert into ... (select ... from) will throw an error"

You probably mean this query: insert into test2 (select id, id from
test) - works with PostgreSQL and HSQLDB; but currently throws an
exception with H2. I will implement it in the next release.

"@rownum:[EMAIL PROTECTED] The first gotcha is that assignments with := do
not work, but they do without the colon"

It's a comparison without the colon (always false). I think ':=' looks
too much like '=', but I will add it as a feature request (MySQL
compatibility).

Regards,
Thomas

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to