[hibernate-issues] [Hibernate-JIRA] Created: (HV-271) HV does not take care "`" to avoid reserved keywords in the sql statements
Strong Liu (JIRA)
noreply at atlassian.com
Mon Nov 16 01:40:08 EST 2009
HV does not take care "`" to avoid reserved keywords in the sql statements
--------------------------------------------------------------------------
Key: HV-271
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-271
Project: Hibernate Validator
Issue Type: Bug
Affects Versions: 3.0.0.ga
Reporter: Strong Liu
Assignee: Hardy Ferentschik
this can be reproduced by JPAValidateListenerTest on oracle
Model org.hibernate.validator.test.jpa.Submarine contains a property named "size", which gets translated to column "size", but this word is reserved in Oracle, causing exceptions in SchemaExport (create table) and consequently the test fails.
After quoting[1] the name of the column, the DDL for the table becomes incorrect, causing a failure in Oracle. When using a different[2] name, the test passes.
Failure when using [1]:
17:45:44,631 ERROR SchemaExport:274 - Unsuccessful: create table Submarine (id number(19,0) not null, commander_name varchar2(255 char), name varchar2(255 char) not null, "size" number(19,0) check (size>=10), primary key (id))
17:45:44,632 ERROR SchemaExport:275 - ORA-00936: missing expression
[1] @Column(name="`size`")
[2] @Column(name="xsize")
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list