wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Relation table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Relation table" Watch "Relation table" New topic
Author

Relation table

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
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

Joined: May 16, 2005
Posts: 513

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.
-


If you are not laughing at yourself, then you just didn't get the joke.
Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
I am unable to use set because I am unable to pass object with set through CXF web service.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Relation table
 
Similar Threads
Simple Question Regarding DAO (Data Access Object)
Hibernate Surrogate key??
Hibernate: changing case of table name
Why a legal identifier cannot include the character #
SQLGrammarException: could not retrieve snapshot: