thank you very much! this is the answer to my problem. much appreciated. i read your thread but unfortunatly i dont know an answer to you problem :(. im relativly new to all of this and furthermore im using mapping files, because i dont like annotations. :)
since you seem to know xml/dtd pretty well, maybe you could tell me, if there is the possibility to parameterize such an entity?
i want to map generic classes. imagine in the AbstractChoice.hbm.xml described in your thead, there was the following property:
Code:
<many-to-one name="survey" column="SurveyID" class="?????"/>
the class of a survey is in the hand of a generic parameter, like
Code:
class AbstractChoice<SurveyType> {
private SurveyType survey;
}
what i want to do is, give that entity an parameter and insert the value of the parameter there, where now are the question marks.
i already read that there are parameterized entities too and i really tried to figure out how to use them in the way that i would need to but i couldnt figure it out. maybe you can tell me if this is possible at all? and if its possible, maybe give a small example? :D because im really to dumb to figure it out, i really tried, but from what i saw (in the examples and explanations i read), i cant see any parameters in the parameterized entities. i just dont get it.
edit: one more question. :D what if there was more than one supertype? i would have to add an entity into an entity, an AbstractChoice.hbm.xml into another AbstractChoice2.hbm.xml, which was the subclass of the first mentioned AbstractChoice.hbm.xml. AbstractChoice2.hbm.xml would then get included into the final mapping file. this isnt possible is it?