I have one doubt here,
While working with JPA I created persistence.xml and I mentioned all my mapping classes in it, my application has created the tables for what ever I have given in peristence.xml , all my mapping classes are annotated with @Entity . I thought that the tables were created based on the entries that we have defined in persistence.xml, but when I removed the entries of some of the classes, then also those tables are getting created , but when I commented the annotation @Entity for what ever the classes that I want to ignore , then those tables are not created. So what my doubt is , even though tables are created with out giving their entries in the persistence.xml by giving @Entity annotation on classes, what should be the use of providing entity classes in to persistence.xml
|