Reputation: 635
I have a normal model class
public class Person {
private int id;
private String name;
...
}
It's a model class and doesn't have any JPA / Hibernate annotations used.
Is it possible to somehow tell Hibernate to make this class persistent?
I want to use Person
in queries, criteria etc, but don't want to introduce annotations to that class (it is defined in a model JAR with no JPA dependency, and I have the DB code in a different JAR);
Upvotes: 0
Views: 160
Reputation: 29240
Hibernate supports XML mappings to map a class to a database, as well as annotations.
Upvotes: 5