validate issue - char converted to varchar2(255) in Oracle
----------------------------------------------------------
Key: HHH-6553
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6553
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.4
Environment: Oracle 10g, Spring 3.0.2, Hibernate 3.5.4
Reporter: Geoff Powdrell
Deployment in Tomcat I get this issue with one of my persistent object, deployment issue
'Wrong column type FGTADM.CABIN_CLASSES for column class_code. Found: char, expected:
varchar2(255 char).
I think the issue is with the Oracle dialect and how it converts a java String type to
varchar2(255); regardless of what is on set on the @Column annotation; in particular the
columnDefinition='char' setting is ignored.
Currently the class that errors on deployment is annotated like this:
public class CabinClass extends FareGateObject {
@Id
@Column(name = "class_code", length=1, columnDefinition = "char")
private String classCode;
The Oracle cabin_class table is structured like this:
COLUMN_NAME TYPE_NAME COLUMN_SIZE
CLASS_CODE CHAR 1
CLASS_NAME VARCHAR2 15
DESCRIPTION VARCHAR2 200
Any help appreciated. Do I need to upgrade hibernate? Is the @Column annotation definition
correct?
regards
geoffpowdrell
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira