-->
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: Problem with mappings in hibernate 4 from jboss7.1.1
PostPosted: Sat Jun 15, 2013 1:25 pm 
Newbie

Joined: Sat Jun 15, 2013 1:10 pm
Posts: 1
Hi guys,

the following scenario doesn't work...

Code:
@Entity
@DiscriminatorColumn()
public abstract class User{
 
  @OneToMany(mappedBy="id.user")
  private List<Langs> langs
}

@Entity
  public class Langs{
   @Id private LangId id;
  }
@Embedable
public class LangId{
   private int id;
   @ManyToOne @JoinColumn(name="user_id" , refere..="id")
   private User user;
}


In the new version of hibernate I get an exception:
Quote:
org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: User.id.company in User.lang


any suggestions? It's clear the scenario where you want composite keys and the mapping must exist inside the composite key definition.

regards
\n\m


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.