-->
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.  [ 1 post ] 
Author Message
 Post subject: AnnotationException: Use of @OneToMany or @ManyToMany target
PostPosted: Sun Oct 17, 2010 2:26 pm 
Newbie

Joined: Sun Oct 17, 2010 11:57 am
Posts: 1
Hallo,

ich bekomme folgenden Fehler:

Quote:
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: de.fhd.champshooting.domain.Disziplin.ergebnisse[de.fhd.champshooting.domain.Ergebnis]


Die zugehörigen Klassen sind:
Code:
@Entity
@Table(name = "tDisziplinen")
public class Disziplin {
    @Id
    @GeneratedValue
    @Column(name="pk_disziplin")
    private int id;
    private String kuerzel;
    private String bezeichnung;
    @OneToMany(mappedBy = "disziplin")
    private List<Ergebnis> ergebnisse;

...


und

Code:
@Entity
@Table(name = "tErgebnisse")
public class Ergebnis {
   @Id
    @GeneratedValue
    @Column(name="pk_ergebnisse")
    private int id;
   private Date datum;
   private int ringe;
   @ManyToOne
   @JoinColumn(name = "fk_schuetze", nullable = false)
   private Schuetze schuetze;
   @ManyToOne
   @JoinColumn(name = "fk_disziplin", nullable = false)
   private Disziplin disziplin;
   @ManyToOne
   @JoinColumn(name = "fk_klasse", nullable = false)
   private Klasse klasse;
   @ManyToOne
   @JoinColumn(name = "fk_wettbewerb", nullable = false)
   private Wettbewerb wettbewerb;

...


Die Konfiguration wird über Annotationen durchgeführt. Und die weiteren Klassen (Schuetze, Klasse, Wettbewerb) sind wie Disziplin aufgebaut und der Fehler kommt dort nicht.

Hat jemand eine Idee, wo der Fehler liegt?

Danke,
Markus


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.