Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

One to Many with multiple tables on One side and one table on Many side

626589Dec 4 2009 — edited Dec 9 2009
Sorry for the confusion in the title. Here is my question. In my program, I have 2 different tables which store 2 different type of entities. Each one of entities has a list of attachments which I stored in a common attachment table. There is a one-to-many relationship between entity tables and attachment table.

ENTITY_ONE (
ID
NAME
)

ENTITY_TWO (
ID
NAME
)

ATTACHMENTS (
ID
ENTITY_ID
ATTACHMENT_NAME
)

ENTITY_ID in ATTACHMENTS table is used to link attachments to either entity one or entity two. All IDs are generated by one sequence. So they are always unique. My question is how I could map this relationship into EntityOne, EntityTwo and Attachment JAVA class?
This post has been answered by james_sutherland on Dec 9 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2010
Added on Dec 4 2009
2 comments
2,481 views