-->
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.  [ 2 posts ] 
Author Message
 Post subject: many-to-one mapping
PostPosted: Fri Jul 16, 2004 3:55 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
I'm trying to use many-to-one mapping for my Struts webapp on Tomcat. In tomcat log, the error is : "duplicate import SupportClient"

Here is my mapping file :

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

<hibernate-mapping>

    <class name="SupportClient" table="SupportClient">

        <id name="numeroSupport" type="int">
            <column name="numerosupport" sql-type="smallint" not-null="true"/>
            <generator class="uuid.hex"/>
        </id>
       
        <property name="numeroClient"  type="int">
            <column name="numeroclient" sql-type="smallint"/>
        </property>

        <property name="numeroDevis"  type="int">
            <column name="numerodevis" sql-type="smallint"/>
        </property>
       
        <property name="observation"  type="string">
            <column name="observation" sql-type="varchar(255)"/>
        </property>
       
        <many-to-one name="typeSupport" class="TypeSupport" column="support"/>
       
    </class>
   
    <class name="TypeSupport" table="TypeSupport">

        <id name="code" type="int">
            <column name="codetypesupport" sql-type="smallint" not-null="true"/>
            <generator class="native"/>
        </id>
       
        <property name="designation"  type="string">
            <column name="libelletypesupport" sql-type="varchar(50)"/>
        </property>
       
    </class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 4:00 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
Sorry... I've found ! I don't need to put class="TypeSupport" in the "many-to-one" tag !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.