Hi,

See
http://stackoverflow.com/questions/16804321/org-h2-jdbc-jdbcsqlexception-column-id-not-found

Regards,
Thomas



On Wed, May 29, 2013 at 3:44 AM, Narayan Iyer <[email protected]>wrote:

> I have a table the following table definition:
>
>         CREATE TABLE IF NOT EXISTS SomeTable
>          (id BIGINT AUTO_INCREMENT NOT NULL,
>           version BIGINT NOT NULL,
>           FOREIGN KEY (id) REFERENCES SomeOtherTable(id)
>           ....);
>
> When I run my app in non-test mode (which uses mysql) it works fine, but
> when I run my unit-test using in-memory H2 database, I get the following
> error:
>
> org.h2.jdbc.JdbcSQLException: Column "ID" not found; SQL statement:
>
>         CREATE TABLE IF NOT EXISTS SomeTable
>
> I tried putting double quotes around it, and it started working, but then
> MySQL errors out!
>
> Is there any workaround in H2? I tried "Mode=MySQL", but it still errors!
> Any ideas?
>
> Thanks
> -Narayan-
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to