Hello Everobody.
First of all I would like to apologize for my poor English, I'm French and I Think you're going to realize it.
I'm discovering Hibernate since a few days, and there are some problems I can not solve.
I'm trying to do "reverse engineering" with hibernate-tools and I've got the following problems :
- I'm using an Oracle database and it seems that "varchar2" type (and others) are unknown.
I've tried to deal by overriding "JDBCToHibernateTypeHelper" and "java.sql.Types" classes, but I think there is another class to override (the one where "JDBCToHibernateTypeHelper" is called I think), and how to specify in the cfg file that it must be used instead of the default one.
In reality I don't know if it is the good method.
With "Middlegen" I was using "JavaTypeMapper" property, does the same thing exist in "hibernate-tools"?
I also (still in Middlegen) overrided "MySQL2Java" class where I could specify some new types, can I do the same with "hibernate-tools"?
- I'm also in trouble with decimal numbers.
In the database, I've got the following definition :
Quote:
ARTPMTP number(19,2)
And here is what I get in the mapping file :
Quote:
<property name="artpmtp" type="java.lang.Double">
<column name="ARTPMTP" precision="126" scale="0" />
</property>
What's going on? Is the jdbc driver going crazy?
- Another little question:
In the database, some comment are associated with fields and tables, can I get them automatically to have something like this in the mapping file ?
Quote:
<hibernate-mapping package="default.connection.art">
<class name="Art" table="ART">
<meta attribute="class-description"><![CDATA[Fichier stock article F-ART ]]></meta>
...
<property name="ARTENT" column="ARTENT" type="string" length="1">
<meta attribute="field-description"><![CDATA[Entreprise ]]></meta>
</property>
...
- At last, and least :
I,'ve ssen something like that in some exmaples :
Quote:
<hibernate-mapping package="default.connection.art">
<class name="Art" table="ART">
But I have something like this:
Quote:
<hibernate-mapping>
<class name="default.connection.art.Art" table="ART">
Is there a way to congigure hibernate-tools to get the first example?
I Thank you for having read me, and I hope someone will save me.
Bye