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
Oracle 10g, Spring 3.0.2, Hibernate 3.5.4
In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.
If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.
Thank you!
Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!
Still reproducible on Hibernate 5.0.3.
The same issue on MySQL and HSQL. The Testcase is attached.
https://dl.dropboxusercontent.com/u/61751342/hibernate-char-varchar-mapping-bug.zip
@brmeyer please take a look to my comment above.
Thanks for the response! However, this is a duplicate of HHH-9853, which is more generalized. Keep an eye on that one!