-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Java code generation - type="big_integer"
PostPosted: Wed Jun 01, 2005 10:25 am 
Newbie

Joined: Thu Feb 17, 2005 5:19 am
Posts: 8
Hibernate version: 3.0.3, hibernate tools 3.0 alpha 1

Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="de.volkswagen.ums.data.impl.SequenceData" table="ums_sequence">
<meta attribute="implements">de.volkswagen.ums.data.impl.IBaseDataObject</meta>
<meta attribute="implement-equals">true</meta>
<id name="oid" column="oid" type="string" unsaved-value="null">
<generator class="assigned"/>
</id>

<version name="version" column="version" type="int"/>

<property name="name" column="name" type="string" length="32" not-null="true"/>
<property name="valFrom" column="val_from" type="big_integer" not-null="true"/>
<property name="valTo" column="val_to" type="big_integer" length="15" not-null="true"/>
<property name="valNext" column="val_next" type="big_integer" length="15" not-null="true"/>

</class>



The Java code generated from this mapping (listed below) maps
the big_integer attributes to big_integer instead of java.math.BigInteger.

Mapping big_decimal to java.math.BigDecimal works as documented.

P.S. I just noticed that no equals() method is generated. I haven't checked
the documentation on this yet to see whether the mapping document
must be changed for this.


---------------------------------

package de.volkswagen.ums.data.impl;


/**
* de.volkswagen.ums.data.impl.SequenceData generated by hbm2java
*/
public class SequenceData implements de.volkswagen.ums.data.impl.IBaseDataObject,java.io.Serializable {

// Fields

private java.lang.String oid;
private java.lang.Integer version;
private java.lang.String name;
private big_integer valFrom;
private big_integer valTo;
private big_integer valNext;


// Constructors

/** default constructor */
public SequenceData() {
}

/** constructor with id */
public SequenceData(java.lang.String oid) {
this.oid = oid;
}



// Property accessors
/**
*/
public java.lang.String getOid () {
return this.oid;
}

public void setOid (java.lang.String oid) {
this.oid = oid;
}
/**
*/
public java.lang.Integer getVersion () {
return this.version;
}

public void setVersion (java.lang.Integer version) {
this.version = version;
}
/**
*/
public java.lang.String getName () {
return this.name;
}

public void setName (java.lang.String name) {
this.name = name;
}
/**
*/
public big_integer getValFrom () {
return this.valFrom;
}

public void setValFrom (big_integer valFrom) {
this.valFrom = valFrom;
}
/**
*/
public big_integer getValTo () {
return this.valTo;
}

public void setValTo (big_integer valTo) {
this.valTo = valTo;
}
/**
*/
public big_integer getValNext () {
return this.valNext;
}

public void setValNext (big_integer valNext) {
this.valNext = valNext;
}




}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 01, 2005 3:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
dont think this issue exist in the current cvs version. report a jira bug if its still there.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2005 5:25 am 
Newbie

Joined: Thu Feb 17, 2005 5:19 am
Posts: 8
OK, the problem seems to be fixed in the latest version. :-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.