 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
blochoo Guest
|
Posted: Sun Oct 29, 2006 8:56 pm Post subject: Oracle TopLink + composite mapping |
|
|
Hello,
I have a little problem with Toplink:
I have a table in Oracle DB:
table T1 {A: integer, B: integer, C: integer}.
I want to have following mapping:
class X { int A; intB;}
class Y{ X objct; int C}
so the objct (of class X) is a composite of class Y, and both of
objects (composite and owner) are in the same table.
Is it possible to make such a mapping in TopLink?
Thanks for every helpful answer.
--
Piotr Bloch
CS @ PUT
Poland |
|
| Back to top |
|
 |
simon.martinelli@gmail.co Guest
|
Posted: Mon Oct 30, 2006 9:45 pm Post subject: Re: Oracle TopLink + composite mapping |
|
|
Hi,
Yes that's possible.
Map X as Aggregate Mapping.
If you now map Y as "normal" Class Mapping you can choose the
attributes of X to map to the database.
Regards, Simon
blochoo wrote:
| Quote: | Hello,
I have a little problem with Toplink:
I have a table in Oracle DB:
table T1 {A: integer, B: integer, C: integer}.
I want to have following mapping:
class X { int A; intB;}
class Y{ X objct; int C}
so the objct (of class X) is a composite of class Y, and both of
objects (composite and owner) are in the same table.
Is it possible to make such a mapping in TopLink?
Thanks for every helpful answer.
--
Piotr Bloch
CS @ PUT
Poland |
|
|
| Back to top |
|
 |
blochoo Guest
|
Posted: Tue Oct 31, 2006 4:02 am Post subject: Re: Oracle TopLink + composite mapping |
|
|
simon.martinelli (AT) gmail (DOT) com napisal(a):
| Quote: | Hi,
Yes that's possible.
Map X as Aggregate Mapping.
If you now map Y as "normal" Class Mapping you can choose the
attributes of X to map to the database.
Regards, Simon
|
Thank You, Simon. It solved my problem.
Regards,
Piotr Bloch |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|