[hibernate-issues] [Hibernate-JIRA] Closed: (HBX-289) In Artifact Generator, char(32) type convert to java.lang.Character
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Mar 21 13:00:24 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HBX-289.
------------------------------
Closing stale resolved issues
> In Artifact Generator, char(32) type convert to java.lang.Character
> -------------------------------------------------------------------
>
> Key: HBX-289
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-289
> Project: Hibernate Tools
> Issue Type: Bug
> Components: reverse-engineer
> Affects Versions: 3.0alpha4
> Environment: Java Version: 1.4.2_06-b03
> OS Name: Windows XP
> OS Arch: x86
> OS Version: 5.1
> Adaptive Server Enterprise/12.5.2/EBF 11948 ESD#1/P/NT (IX86)/OS jConnect (TM) for JDBC(TM)/5.5(Build 25100)/P/EBF9853/JDK12/Fri Oct
> Eclipse 3.1M6
> Reporter: Etienne Laverdiere
> Fix For: 3.1alpha5
>
>
> When doing the reverse enginnering of a Sybase database (didn't try other), it convert all CHAR Data Type to Character Java Type.
> Per example : on this table
> create table AstRegion (
> astRegion char(6) not null,
> astCountry char(3) null,
> astType char(1) not null,
> astDescription char(32) not null,
> astLastMaintUser char(10) not null,
> astLastMaintType char(1) not null,
> astLastMaintJob char(10) not null,
> astLastMaintTime numeric(6) not null,
> astLastMaintDate numeric(8) not null,
> constraint PK_ATFR3600 primary key (astRegion),
> constraint FK_ATFR3600_REFERENCE_ATFR1900 foreign key (astCountry)
> references AstCountry (astCountry)
> )
> go
> I get this java code:
> /**
> * AstRegion generated by hbm2java
> */
> public class AstRegion implements java.io.Serializable {
> // Fields
> private java.lang.Character AstRegion;
> private AstCountry AstCountry;
> private java.lang.Character AstType;
> private java.lang.Character AstDescription;
> private java.lang.Character AstLastMaintUser;
> private java.lang.Character AstLastMaintType;
> private java.lang.Character AstLastMaintJob;
> private java.lang.Integer AstLastMaintTime;
> private java.lang.Integer AstLastMaintDate;
> // Constructors
> /** default constructor */
> public AstRegion() {
> }
>
> /** constructor with id */
> public AstRegion(java.lang.Character AstRegion) {
> this.AstRegion = AstRegion;
> }
>
>
>
> // Property accessors
> /**
>
> */
>
> public java.lang.Character getAstRegion () {
> return this.AstRegion;
> }
>
> public void setAstRegion (java.lang.Character AstRegion) {
> this.AstRegion = AstRegion;
> }
> /**
>
> */
>
> public AstCountry getAstCountry () {
> return this.AstCountry;
> }
>
> public void setAstCountry (AstCountry AstCountry) {
> this.AstCountry = AstCountry;
> }
> /**
>
> */
>
> public java.lang.Character getAstType () {
> return this.AstType;
> }
>
> public void setAstType (java.lang.Character AstType) {
> this.AstType = AstType;
> }
> /**
>
> */
>
> public java.lang.Character getAstDescription () {
> return this.AstDescription;
> }
>
> public void setAstDescription (java.lang.Character AstDescription) {
> this.AstDescription = AstDescription;
> }
> /**
>
> */
>
> public java.lang.Character getAstLastMaintUser () {
> return this.AstLastMaintUser;
> }
>
> public void setAstLastMaintUser (java.lang.Character AstLastMaintUser) {
> this.AstLastMaintUser = AstLastMaintUser;
> }
> /**
>
> */
>
> public java.lang.Character getAstLastMaintType () {
> return this.AstLastMaintType;
> }
>
> public void setAstLastMaintType (java.lang.Character AstLastMaintType) {
> this.AstLastMaintType = AstLastMaintType;
> }
> /**
>
> */
>
> public java.lang.Character getAstLastMaintJob () {
> return this.AstLastMaintJob;
> }
>
> public void setAstLastMaintJob (java.lang.Character AstLastMaintJob) {
> this.AstLastMaintJob = AstLastMaintJob;
> }
> /**
>
> */
>
> public java.lang.Integer getAstLastMaintTime () {
> return this.AstLastMaintTime;
> }
>
> public void setAstLastMaintTime (java.lang.Integer AstLastMaintTime) {
> this.AstLastMaintTime = AstLastMaintTime;
> }
> /**
>
> */
>
> public java.lang.Integer getAstLastMaintDate () {
> return this.AstLastMaintDate;
> }
>
> public void setAstLastMaintDate (java.lang.Integer AstLastMaintDate) {
> this.AstLastMaintDate = AstLastMaintDate;
> }
> }
> It seems that a CHAR(32...) should be translate to a String and not a Character java Type.
> Thank
> Etienne.
> Montreal
--
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