i'm a first time join user (hibernate annotation)
I've a simple problem
with only 2 tables :
Quote:
users:
user varchar(50) primekey not null
and
roles:
id auto generate
userGroup varchar(50) not null
role ...
clearly all roles can be matched to all users the classic.
Quote:
@ManyToMany(targetEntity=roles.class)//owning side many to many
@JoinTable(name="roles", catalog = "identification",schema="", //Join table specs if missing authentication_authorisation
joinColumns=@JoinColumn (name="user"), //owning side USERof the assotiation
inverseJoinColumns= @JoinColumn(name="userGroup")) //not owning ROLES side foreign key of the assotiation
individualy the tables work but as I join: them I run into trouble not understanding why
I get the following error
Quote:
exception :::
:roles [userGroup])) must have same number of columns as the referenced primary key (roles [user,userGroup])
i did erase all grouped key's all foreign keys .....
have the exact same specification fro the columns user and UserGroup
there is to me NOTHING that can be of a different number of colomns unless the whole hibernate setup is corrupt and not working
DO I INTERPRETE THE ANNOTATION BADLY ??? please give me a KICK
Ps as I use the same name in both tables , it mentions it double refferences ????