-->
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 to remove DAO for association table in many-to-many rel.
PostPosted: Thu Aug 11, 2005 6:29 am 
Newbie

Joined: Mon Aug 08, 2005 2:02 am
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:2.1

hibernate synch doesn't realize many-to-many relationship and treats it as 2 one-to-many and many-to-one relations and so create a DAO for the association table:
consider we have 2 tables: professor and student that have many-to-many relationship, hiberenate sync generates three DAOs:

ProfessorDAO
StudentDAO
ProfessorStudentDAO

and three value objects:

Professor
Student
ProfessorStudent


there is no findByStudent on the ProfessorDAO, so if you want to get all the professors of a student you need to call findByStudent of the ProfessorStudentDAO and get a list of ProfessorStudent and from them get the Professors value objects.

is there any way to tell hibernate synch not to generate the association table DAO? (and place the findByStudent and findByProfessor on the
ProfessorDAO and StudentDAO)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 6:48 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Hibernate synch is not an official hibernate tools. So keep using the right forum on eclipse central.

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


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.