Hi all,
I have a JAR which stores the classes for an object model. It also
defines the JPA annotations needed for doing Hibernate persistence.
The package also uses persistence.xml and <persistence-unit>, with no
need to list the mapped classes, cause they are automatically read
from the code.
So far so good, but now I need to use the resulting JAR from another
application. I need to do basic things, such as creating an object and
saving it in the DB. I cannot make Hibernate working in this case. It
tells me the class X is not mapped. I can have it working only if I
explicitly specify all the mapped classes in persistence.xml (via
<class>). Is there a way to tell hibernate to go through the jars in
the CLASSPATH?
Thanks in advance.
Cheers.
Marco.