-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate Many-toMany
PostPosted: Mon Mar 13, 2006 9:11 am 
Newbie

Joined: Tue Mar 07, 2006 8:31 am
Posts: 7
Hibernate Tools 3.1 beta 4
Eclipse SDK 3.1.2
PostgreSQL 8.1

Hallo an alle!

Ich bin ziemlich neu in hibernate und brauche hilfe.

Es gibt eine einfache many-to-many assoziation: Person und Equipment und die Assoziationstabelle Person_Equipment mit zwei PKs: PersonID und EquipmentID.

Code:
CREATE TABLE person (
id int8 CONSTRAINT PK_person_id PRIMARY KEY,
firstname varchar(50),
surname varchar(50)
)
WITHOUT OIDS

CREATE TABLE equipment (
id int8 CONSTRAINT PK_equipment_id PRIMARY KEY,
title varchar(50),
description varchar(500)
)
WITHOUT OIDS

CREATE TABLE person_equipment (
person_id int8,
equipment_id int8,
CONSTRAINT FK_person_id FOREIGN KEY (person_id) REFERENCES person (id),
CONSTRAINT FK_equipment_id FOREIGN KEY (equipment_id) REFERENCES equipment (id)
)
WITHOUT OIDS


Das Hibernate tool erstellt 3 mapping Dateien für person, equipment and person_equipment und 3 POJO-Klassen. Ich brauche allerdings nur zwei POJO klassen mit assoziations-HashSets zwischen person und equipment.

Wie kann ich mit Hibernate Tools die zwei mapping Dateien und POJO erstellen?

Danke,
Eugen Lechner


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

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.