-->
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: Mapping bei Vererbung
PostPosted: Sun Aug 19, 2007 7:53 am 
Newbie

Joined: Sun Aug 19, 2007 7:44 am
Posts: 9
Hallo alle zusammen,

ich habe zwei Klassen Rating und BaseRating. Rating erbt dabei von BaseRating. Die zwei Klassen leigen in unterschiedlichen Namespaces und auch in unterschiedlichen DLLs. Wie muss ich jetzt die Mapping Files schreiben? Liegen beide in der gleichen DLL (was bei diesem Projekt aber nicht mglich sein wird), dann sieht mein Mapping file ca. so aus:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="BLL.CommonEntities" assembly="BLL.CommonEntities">
<class name="BaseRating" table="BaseRating">
<id name="ID">
<column name="RatingID" sql-type="int32" not-null="true"/>
<generator class="identity" />
</id>
<property name="Transaction" >
<column name="TransactionName" not-null="true" />
</property>
<property name="Tranche" >
<column name="TrancheName" not-null="true" />
</property>
<joined-subclass name="Rating" table="Rating">
<key column="RatingID"/>
<property name="Description" column="Description" />
</joined-subclass>
</class>
</hibernate-mapping>

Dies funktioniert super, aber was muss ich machen, wenn beide Klassen in unterschiedlichen DLLs liegen???

Vielen Dank für eure Mühe
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 9:29 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
Ich kenn mich mit .NET und NHibernate nicht aus, aber im Java hibernate kannst Du die Subclass mappings auch in eine eigene mapping Datei auslagern.

_________________
Please don't forget to rate


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.