Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / November 2004

Tip: Looking for answers? Try searching our database.

[PB] Hibernate mapping Exception

Thread view: 
Erwan - 17 Nov 2004 17:00 GMT
Hi, I'm in deep trouble with the following, and don't know how to
solve the thing.  Well, here it is :

My error msg :
net.sf.hibernate.MappingException: property mapping has wrong number
of columns: oim.database.model.OadParametreAlgorithme.valDefaut type:
object

my xml mapping :

<hibernate-mapping>
<!--middlegen 2.1-->
<class
   name="oim.database.model.OadParametreAlgorithme"
   table="OAD_PARAMETRE_ALGORITHME"

   <id
       name="idParamAlgo"
       type="java.math.BigDecimal"
       column="ID_PARAM_ALGO"
   >
       <generator class="assigned" />
   </id>

   <property
       name="coParametre"
       type="java.lang.String"
       column="CO_PARAMETRE"
       not-null="true"
       length="10"
   />
   <property
       name="lbParam"
       type="java.lang.String"
       column="LB_PARAM"
       not-null="true"
       length="50"
   />
   <property
       name="unite"
       type="java.lang.String"
       column="UNITE"
       length="20"
   />
   <property
       name="valDefaut"
       type="java.lang.Object"
       column="VAL_DEFAUT"
       length="126"
   />
   <property
       name="valAlgoMin"
       type="java.math.BigDecimal"
       column="VAL_ALGO_MIN"
       length="22"
   />
   <property
       name="valAlgoMax"
       type="java.math.BigDecimal"
       column="VAL_ALGO_MAX"
       length="22"
   />

   <!-- Associations -->
 
   <!-- bi-directional many-to-one association to OadAlgorithme -->
   <many-to-one
       name="oadAlgorithme"
       class="oim.database.model.OadAlgorithme"
       not-null="true"
   >
       <column name="ID_ALGORITHME" />
   </many-to-one>
   <!-- bi-directional one-to-many association to OadAlgoValeurParam
-->
   <set
       name="oadAlgoValeurParams"
       lazy="true"
       inverse="true"
        cascade="none"
   >
       <key>
           <column name="ID_PARAM_ALGO" />
       </key>
       <one-to-many
           class="oim.database.model.OadAlgoValeurParam"
       />
   </set>

</class>
</hibernate-mapping>

As I haven't been able to find any clue about this on groups and www
(hibernate site, docs), two options :
I'm too bad -(((
middlegen 2.1 is too bad -(((
Anyway, I'll be glad to learn about any issue.
Thx alot
Erwan
jlp - 17 Nov 2004 17:27 GMT
Erwan a écrit :
> Hi, I'm in deep trouble with the following, and don't know how to
> solve the thing.  Well, here it is :
[quoted text clipped - 95 lines]
> Thx alot
> Erwan
For properties , you may use Hibernate types ; and java.lang.Object (
valDefault) is not a valid Hibernate type regarding Hibernate Reference
Manual. java.lang.Object is not serializable...
class is a valid type... Class is serializable
Regards
JL PASTUREL
Erwan - 18 Nov 2004 09:31 GMT
> Erwan a écrit :
> > Hi, I'm in deep trouble with the following, and don't know how to
[quoted text clipped - 102 lines]
> Regards
> JL PASTUREL

Thx JL, It works fine now 8)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.