]
Hardy Ferentschik updated HV-271:
---------------------------------
Fix Version/s: 3.2.0
Component/s: legacy
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
Components: legacy
Affects Versions: 3.0.0.ga
Reporter: Strong Liu
Assignee: Hardy Ferentschik
Fix For: 3.2.0
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: