Hello,
I'm trying to map an existing schema, my problem is the following:
The class A is stored in table A with primary column APRIMARY.
Collections of A are stored in table AS with column ASPRIMARY and
foreign key column ASREF references A
The class C references collection of A: there is a column CAS which references the column ASPRIMARY of AS
The class D references collection of A: there is a column DAS which references the column ASPRIMARY of AS
eg
A: APRIMARY
1
2
...
AS: ASPRIMARY ASREF
1 1
1 7
2 1
2 9
C: CPRIMARY CAS
1 1
D: DPRIMARY CAS
1 2
How can i map this schema ?
Moreover how can i map such a design if the collection is heterogenous ? (that is to say the table AS contains one more column which is the class id)
Thanks in advance.
|