Hello,
this i have to map:
<!-- Medium --> <!-- Zu mappende Attribute: erscheinungsjahr, medienart, preis, signatur, titel --> <entity class="Medium" access="FIELD"> <!-- Vererbung liegt vor: --> <inheritance/> <discriminator-column name="MARTID" /> <attributes> <id name="signatur"> <column name="SIGNATUR" /> <!-- Automatische Erzeugung von Schlüsselwerten --> <generated-value strategy="AUTO" /> </id> <basic name="titel"> <column name="TITEL" /> </basic> <basic name="erscheinungsjahr"> <column name="ERSCHEINUNGSJAHR" /> </basic> <basic name="preis"> <column name="WIEDERBESCHAFFUNGSPREIS" /> </basic> <many-to-one name="medienart" fetch="LAZY"> <join-column name="MARTID" /> </many-to-one> </attributes> </entity>
<!-- Buch --> <!-- Zu mappende Attribute: isbn --> <entity class="Buch" access="FIELD"> <discriminator-value>1</discriminator-value> <attributes> <basic name="isbn" optional="false"> <column name="ISBN" /> </basic> </attributes> </entity>
<!-- Zeitschrift --> <!-- Zu mappende Attribute: issn --> <entity class="Zeitschrift"> <discriminator-value>2</discriminator-value> <attributes> <basic name="issn" optional="false"> <column name="ISSN" /> </basic> </attributes> </entity>
But now I get the error: Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: Buch column: MARTID (should be mapped with insert="false" update="false"). But haven't I to set MARTID twice? First to say what make out Buch and Zeitschrift and secound to get medienart (?).
Why is it wrong?
Greetings Matthias
|