Hi,
my classes:
public class User
{
public Integer getId()
{
return(_id);
}
public void setId()
{
_id=id;
}
public Map getGroups()
{
return(_groups);
}
public void setGroups(Map groups)
{
_groups=groups;
}
protected Integer _id;
protected Map _groups;
}
public class Group
{
public Integer getId()
{
return(_id);
}
public void setId()
{
_id=id;
}
public Map getUsers()
{
return(_users);
}
public void setUsers(Map users)
{
_users=users;
}
protected Integer _id;
protected Map _users;
}
my tables:
CREATE TABLE users
(
int id PRIMARY KEY
);
CREATE TABLE groups
(
int id PRIMARY KEY
);
CREATE TABLE group_memberships
(
user_id int REFERENCES users(id),
group_id int REFERENCES groups(id)
);
My goal is that the keys on User.groups were the group.id and
Group.users were the user.id
I've tried many differents mappings after reading the docs... but no way.
Can somebody help me on this mapping??
Thanks in advance.
Congratulations for the great software you make!
Bernardo Antonio Buffa Colome
kreimer@bbs.frc.utn.edu.ar