• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Relation table

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have a User Table and a Network Identifiers table.
Tables are linked with user_identifiers table so user can have several identifiers (ip, host, user_name, etc)
All classes generated using hbm2java.

The user_ identifiers class is bound to UserIdentifierPK class like:


Is it ok that getIdentifierId and getUserId methods exist both in UserIdentifierPK and UserIdentifier?

What is the correct way to pull user and then all it's Identifiers?

Thank you very much
Sharon

Table's structure:
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sharon whipple:

Is it ok that getIdentifierId and getUserId methods exist both in UserIdentifierPK and UserIdentifier?


Yes. No harm. But if you have it in useridentifier, you might eventually have to look through the useridentifierPK class and get it. But why would you want to do that?


Originally posted by Sharon whipple:

What is the correct way to pull user and then all it's Identifiers?


Have a set of identifiers in User POJOS. Would be easy to pull them.
-
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to use set because I am unable to pass object with set through CXF web service.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic