Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mapping multiple assosiations

 
Kevin Fitzpatrick
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am looking for some help with code i am developing, I have 3 entity classes Organisation, Groups and Users. Organisation is the parent class which has a list of Groups and Group has a list of Users. The assosiation between Tables looks as follows:

organisation
organisationId (PK)

Group
groupId (PK)
organisation_id(FK)

User
userId (PK)
group_id (FK)

The problem is that the when i save an organisation the mapping between organisation and groups is fine, but missing some of the assosiation between groups and users. I believe this is due to some of the users are updating instead of inserting. Here is the mapping files that i am using, any help would be welcome.

 
Kevin Fitzpatrick
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to find out what the problem was, the code i posted works fine, it was an issue with my test data. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic