I am wondering if anyone has run into this issue, and whether they've found solution or not. I am noticing that if I put META-INF/persistence.xml in src/main/resources (note: src/main/resources also on classpath in Eclipse), when searching for the entities hibernate also searches src/main/resources. It then finds META-INF/persistence.xml, and from there it begins it's entity search. It does not obviously find any classes in src/main/resources, so no mapped entities....
Excerpt from hibernate log:
Code:
DEBUG - Searching mapped entities in jar/par: file:/D:/java/projects/test-project/model/src/main/resources
I get around this currently by storing it in another folder for maven-resource-filtering, and remove it from the classpath. But this seems not the right approach...
Hibernate version:
org.hibernate:hibernate:jar:3.2.3.ga:compile
org.hibernate:hibernate-annotations:jar:3.3.0.ga:compile
org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile
org.hibernate:hibernate-entitymanager:jar:3.3.1.ga:compile
org.hibernate:hibernate-tools:jar:3.2.0.beta8:compile
org.hibernate:jtidy:jar:r8-21122004:compile
Mapping documents: autodetection="class"
Name and version of the database you are using: PostgreSQL
Debug level Hibernate log excerpt: DEBUG