sanjaybhatt73 wrote:
I have 70+ tables in my database and each table contains average 20-30 fields. If i have to change the datatypes manually it will take ages. I added the following lines in seam-gen.reveng.xml files.
<type-mapping>
<sql-type jdbc-type="TIMESTAMP" hibernate-type="date" length="9"/>
<sql-type jdbc-type="INTEGER" hibernate-type="java.Lang.Integer" />
<sql-type jdbc-type="NUMERIC" hibernate-type="java.Lang.Float" />
<sql-type jdbc-type="DECIMAL" hibernate-type="java.Lang.Double" />
<sql-type jdbc-type="VARCHAR" length="1" not-null="true" hibernate-type="java.lang.Character" />
<sql-type jdbc-type="VARCHAR" length="1" hibernate-type="char" />
<sql-type jdbc-type="VARCHAR" hibernate-type="string" />
</type-mapping>
Still Seam is generating Timestamp -> Serializable, INTEGER,NUMERIC,DECIMAL -> BigDecimal.
Can anyone assist?
How about using this:
<sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" />
This works for me, because I only have oracle timestamp mapped to jdbc type other.
I don't know if this is Hibernate Tools bug or not? I hope to hear from Hibernate guys.