Please explain hibernate many-to-many mapping with the help of a simple example.
I referred the following link http://viralpatel.net/blogs/hibernate-many-to-many-annotation-mapping-tutorial to understand, but i am still in doubt if the table structure is already created in the database by the user or does hibernate create it for us as in case of One-To-Many or Many-To-One mappings.
Of course you have to create the database and mappings yourself. Hibernate only manages the entities and generate queries for you.
posted 3 years ago
Whether hibernate creates the tables or not has nothing to do with whether the relationship is many to many or one to many. It is determined by the value you set for the property hibernate.hbm2ddl.auto in your configuration.