• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Hibernate creating entites not listed in persistence.xml  RSS feed

 
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay I am a beginner to Hibernate and JPA. I want to know what is the purpose of having a mapping in the persistence.xml like the following -:

<class>test.entity.Course</class>

When I run my project in Eclipse Hibernate creates the tables of the all the classes marked with @Entity annotation, regardless of the fact whether it is present in the persistence.xml file. So what was the use of the mapping in persistence.xml ? How can i stop Hibernate or JPA to map objects that I don't want other than deleting them from the project all together.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!