AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oracle TopLink + composite mapping

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
blochoo
Guest





PostPosted: Sun Oct 29, 2006 8:56 pm    Post subject: Oracle TopLink + composite mapping Reply with 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
simon.martinelli@gmail.co
Guest





PostPosted: Mon Oct 30, 2006 9:45 pm    Post subject: Re: Oracle TopLink + composite mapping Reply with 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


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





PostPosted: Tue Oct 31, 2006 4:02 am    Post subject: Re: Oracle TopLink + composite mapping Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.