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)