OneToMany with composite keys [message #882911] |
Thu, 07 June 2012 09:10  |
Eclipse User |
|
|
|
Hi,
Using EclipseLink 2.3.2. Db is HSQLDB (for testing). I'm trying model part of a legacy data base schema, which I cannot change. There is one particular relationship which I have not been able to create:
There is a conceptual one-to-many relationship between TableA and TableB:
TableA
id (pk)
sequence (pk)
tableBid (fk)
TableB
id (pk)
sequence(pk)
value
So TableA references half of TableB's composite primary key. I suppose it could be argued that this is a many-to-many relationship since there is no guarantee that the same row in table B will not be referenced by several rows in table A. Would I have to model this as a many-to-many and create a link table or is there any other way of molelling this?
|
|
|
|
Powered by
FUDForum. Page generated in 0.26624 seconds