-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How may I map attributes in a many to many relationship?
PostPosted: Tue Apr 20, 2004 10:52 am 
Newbie

Joined: Fri Apr 16, 2004 11:48 am
Posts: 18
Hibernate version 2.1.2

How may I map attributes in a many to many relationship?

create table REFERENCE_ENTITY
(
id integer IDENTITY primary key,
name varchar,
);
create table POOL
(
id integer IDENTITY primary key,
name varchar,
)

create table POOL_SET (
poolId integer not null,
referenceEntityId integer not null,
anAttributeOfMyrelations varchar,
entityIndex integer not null,
foreign key (poolId) references POOL(id),
foreign key (referenceEntityId) references REFERENCE_ENTITY(id)
);

I have 2 classes, one for Entity and one for Pool and the usual many-to-many realation implemented as a list.
The question is:
how do I model my anAttributeOfMyrelations ?

Many thanks!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 5:45 am 
Newbie

Joined: Fri Apr 16, 2004 11:48 am
Posts: 18
I understand that the solution is in section 7.2 of the manual. I was wondering if anyone got some examples I could start from....

Many thanks!!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.