|
Test case attached. As attached, persistence.xml contains this:
...
<!--<class>com.wrox.site.entities.Author</class>
<class>com.wrox.site.entities.Book</class>
<class>com.wrox.site.entities.Publisher</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>-->
...
If you compile and run this (in Tomcat), the entity classes are picked up (which is not correct). Change persistence.xml to this:
...
<!--<class>com.wrox.site.entities.Author</class>
<class>com.wrox.site.entities.Book</class>
<class>com.wrox.site.entities.Publisher</class>-->
<exclude-unlisted-classes>false</exclude-unlisted-classes>
...
Now run it and the entity classes are NOT picked up also not correct. The behavior should be the reverse in both cases.
|