]
Steve Ebersole closed HHH-1272.
-------------------------------
Closing stale resolved issues
hbm2ddl does not escape sql keywords used as column names
---------------------------------------------------------
Key: HHH-1272
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1272
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.1
Reporter: Andrew C. Oliver
Priority: Minor
Original Estimate: 1h
Remaining Estimate: 1h
HM2ddl does this:
2005-12-14 14:01:42,499 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] create table
MessageData (id bigint generated by default as identity (start with 1), subject
varchar(255), to varchar(255), from varchar(255), timestamp timestamp, deleted bit not
null, header varchar(255), bodyId bigint not null, size bigint not null, folder_id bigint,
primary key (id))
which pukes with this:
2005-12-14 14:01:42,511 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful:
create table MessageData (id bigint generated by default as identity (start with 1),
subject varchar(255), to varchar(255), from varchar(255), timestamp timestamp, deleted bit
not null, header varchar(255), bodyId bigint not null, size bigint not null, folder_id
bigint, primary key (id))2005-12-14 14:01:42,513 ERROR
[org.hibernate.tool.hbm2ddl.SchemaExport] Unexpected token: TO in statement [create table
MessageData (id bigint generated by default as identity (start with 1), subject
varchar(255), to]
Should read:
create table MessageData (id bigint generated by default as identity (start with 1),
subject varchar(255), "to" varchar(255), "from" varchar(255),
timestamp timestamp, deleted bit not null, header varchar(255), bodyId bigint not null,
size bigint not null, folder_id bigint, primary key (id))
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: