-->
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.  [ 4 posts ] 
Author Message
 Post subject: Prolem with one-to-many mapping. Help!!!
PostPosted: Mon Jul 19, 2004 7:21 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
Help!!!
I get
Error reading resource: tippspiel/tippspiel.hbm.xml
since two hours and I can't find the problem. "Mitspieler" is a Player, who could be Admin of several Teams("Tippgemeinschaft"). I'm trying to map one-to many relationship.
If I comment the <set> -section of the File, the problem doesn't occur.

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="tippspiel.Mitspieler" table="MITSPIELER">

        <!-- ID generieren -->
        <id name="id" type="long" unsaved-value="null">
         <column name="ID" sql-type="bigint(20)" not-null="true"/>
         <generator class="native"/>
      </id>
        <!-- Name, email, passwort Mapping -->
        <property name="name">
            <column name="NAME" length="16" not-null="true"/>
        </property>
        <property name="email">
          <column name="EMAIL" length="16" not-null="true"/>
        </property>      
      <property name="passwort">
          <column name="PASSWORT" length="16" not-null="true"/>
        </property>
      
            
       <set name="tippgemeinschaften" inverse="true" lazy="true" cascade="all-delete-orphan">
            <key column="ADMIN_ID"/>
            <one-to-many class="Tippgemeinschaft"/>
         </set>
   </class>

Does anyone see, what's wrong with my hbm.xml-File?
Lena


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 7:37 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
I could guess that something is wrong with a mapping of "Tippgemeinschaft" class, check that corresponding mapping presents in the correct place in your classpath and try to specify full class name of "Tippgemeinschaft". And look into hibernate DEBUG level log, if it is not enabled, enable it.

--
Leonid


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 7:40 am 
Newbie

Joined: Tue Feb 24, 2004 8:08 am
Posts: 4
Hi
Quote:
<one-to-many class="Tippgemeinschaft"/>

shouldnt it be class="tippspiel.Tippgemeinschaft" ?

where is the mapping for the class Tippgemeinschaft ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 7:46 am 
Newbie

Joined: Thu Jul 15, 2004 3:21 am
Posts: 18
Location: Hamburg, Germany
Thanks a lot!!!
It does really help to ask someone in Hibernate Forum!
Lena


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