My persistence.xml
has 2 persistence-units. Each of them has several <class>
elements.
I thought that we must specify all classes related to certain persistence-unit. But I accidentally forgot to specify class-element for new entity but the program worked fine even without it. Then I removed all class-elements and everything worked fine. So, why do we need it?
sample code:
<persistence-unit name="JiraManager" transaction-type="RESOURCE_LOCAL">
<class>chartdemo.model.domain.Category</class>
</persistence-unit>