-->
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: Eine Map mit one-to-many
PostPosted: Tue Aug 09, 2005 6:45 am 
Beginner
Beginner

Joined: Sun Apr 24, 2005 4:25 am
Posts: 28
Hi,

ich möchte in meinem Persistenten Objekt eine Map. Als Schlüssel habe ich einen Long [Language.getId()] und als Wert eine andere Klasse [Description].

Code:
...
<map name="descriptions" table="DESCRIPTION" cascade="all-delete-orphan">
    <key column="EXPORT_ID"/>
    <index column="LANGUAGE_ID" type="Language"/>
    <one-to-many class="Description"/>
</map>...

<class name="Description" table="DESCRIPTION">

    <id name="id" type="long" unsaved-value="-1">
        <column name="ID" not-null="true"/>
        <generator class="native"/>
    </id>

    <property name="description" type="string">
        <column name="DESCR" not-null="true" length="2000"/>
    </property>

    <many-to-one name="Language" class="Language" column="LANGUAGE_ID" cascade="save-update"/>

</class>


Kann mir jemand das passende Mapping Stück für eine Map liefern? Komm nicht einfach weiter.

Vielen Dank!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 8:52 am 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
http://www.hibernate.org/hib_docs/v3/re ... ts-dynamic


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.