This content has been marked as final.
Show 5 replies
-
1. Re: Data marshalling problem with Oracle TIMESTAMP(6)
jerryeads52 Oct 31, 2008 7:08 PM (in response to jerryeads52)After doing some surfing I found that I needed to add a filter to the ..\jboss-seam-2.1.0.GA\seam-gen\hibernatetools\seam-gen.reveng.xml file. So I added this filter to the file per Hibernate User Forum:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<!-- Added by JEEads to take care of TIMESTAMP mapping issue 10/31/08 -->
<type-mapping>
<sql-type jdbc-type="TIMESTAMP" hibernate-type="java.sql.Timestamp" />
<sql-type jdbc-type="NUMERIC" hibernate-type="java.lang.Long" />
<sql-type jdbc-type="DECIMAL" hibernate-type="java.lang.Long" />
<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>
<!-- This file is intentionally generated empty by seam-gen -->
<!-- You can add any filtering/setup you want for your app -->
</hibernate-reverse-engineering>
Afer updating this file and regenerating my entities I still get TIMESTAMP being converted to java.io.Serializable can someone explain to me what I a doing wrong?
Thanks
Jerry -
2. Re: Data marshalling problem with Oracle TIMESTAMP(6)
joblini Nov 1, 2008 3:16 AM (in response to jerryeads52)I'm pretty sure that this is a Hibernate issue, have you tried asking this question on the user forum?
-
3. Re: Data marshalling problem with Oracle TIMESTAMP(6)
jerryeads52 Nov 1, 2008 3:26 AM (in response to jerryeads52)I have been on both the Hibernate Forum and this Forum today I got the type mapping node off of the Hibernate Forum but it didn't work for TimeStamp but it did change the references for NUMERIC and DECIMAL for BigDecimal to Long. I have to believe someone other than myself has tried to reverse engineer an Oracle database with TIMESTAMP(6) field types. One other question when will SEAM 2.1 bue compatible with JBoss 5.0?
Thanks for the response
Jerry -
4. Re: Data marshalling problem with Oracle TIMESTAMP(6)
joblini Nov 1, 2008 3:43 AM (in response to jerryeads52)Just guessing, maybe add length=6 to the mapping?
-
5. Re: Data marshalling problem with Oracle TIMESTAMP(6)
developwf Oct 31, 2010 11:36 PM (in response to jerryeads52)Did someone resolve this? Read in hibernate forum that a workaround would be to define a mapping for OTHER with Timesamp.
<sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" />