amar_hyd wrote:
I am new hibernate user.I am using hibernate with Java Persistence API.
When i try to map a collection to the database . It automatically creates a second table for the collection.Is it supposed to happen that way??
Is there a way to stop it from creating it.
Hibernate favors designing an association with a join table. That's actually not a bad idea at all. I am not sure how you can disable this because though. In certain cases however you will be able to put @JoinColumns, as in case of one-to-many, and that should (would) force hibernate to skip a join table.
Farzad-