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: org.hibernate.MappingException
PostPosted: Mon Aug 27, 2007 4:10 am 
Newbie

Joined: Mon Aug 27, 2007 4:08 am
Posts: 8
Hi, please forgive my english, but Im lost and I don't see if this is a bug or limitation, but I can't reuse a column ina ManyToMany association.
This is important because the schema is implemented and I need evaluate de migration.






public class Context {
@Id String id;
@Column name;
}

public class Group {
@Id Context context;
@Id String id;
@Column name;
@ManyToMany
@JoinTable(
joinColumns = {
@JoinColumn(name = "context_id", referencedColumnName = "context_id"),
@JoinColumn(name = "group_id", referencedColumnName = "id")},
inverseJoinColumns = {
@JoinColumn(name = "context_id", referencedColumnName = "context_id"),
@JoinColumn(name = "role_id", referencedColumnName = "id")})
Set<Role> roles;

}

public class Role {
@Id Context context;
@Id String id;
@Column name;
}



Error: org.hibernate.MappingException: Repeated column in mapping for collection: test.Group.roles column: context_id


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.