Play 1.2: Syntax error in SQL statement "CREATE TABLE ...

1,157 views
Skip to first unread message

Cyrille37

unread,
Apr 13, 2011, 3:34:57 PM4/13/11
to play-framework
Hi,

I've just call "play new MyApp" then copied Files from another simple
application.
Play1.2 seems to cannot create tables from the data.yml loaded by the
bootstrap.

Listening for transport dt_socket at address: 8000
21:28:46,631 INFO ~ Starting /home/cyrille/Code/TPF-0.2
21:28:47,077 WARN ~ You're running Play! in DEV mode
21:28:47,152 INFO ~ Listening for HTTP on port 9001 (Waiting a first
request to start) ...
21:28:53,032 INFO ~ Connected to jdbc:h2:mem:play;MODE=MYSQL
21:28:53,678 ERROR ~ Unsuccessful: create table Category (id integer
generated by default as identity, code varchar(255), note
varchar(255), order integer not null, primary key (id))
21:28:53,678 ERROR ~ Syntax error in SQL statement "CREATE TABLE
CATEGORY (ID INTEGER GENERATED BY DEFAULT AS IDENTITY, CODE
VARCHAR(255), NOTE VARCHAR(255), ORDER[*] INTEGER NOT NULL, PRIMARY
KEY (ID)) "; expected "identifier"; SQL statement:
create table Category (id integer generated by default as identity,
code varchar(255), note varchar(255), order integer not null, primary
key (id)) [42001-149]
...

What's the message "expected identifier" ?

Perhaps I've miss some documentation about migration from 1.1.1 to
1.2 ?
I've read http://www.playframework.org/documentation/1.2/releasenotes-1.2
but not found a reason ...

Thanks
Cyrille

Cyrille37

unread,
Apr 13, 2011, 3:40:43 PM4/13/11
to play-framework
Problem found: a difference in configuration.
It needs :

hibernate.globally_quoted_identifiers=true

Thanks to the Play! Team for a such pretty good web framework !!!!

Cheers
Cyrille.
> I've readhttp://www.playframework.org/documentation/1.2/releasenotes-1.2
Reply all
Reply to author
Forward
0 new messages