I am seeking a way to get information about my hibernate entity classes at runtime. In detail I would need information like
Class ABC has the properties a, b and c with c being a
list and association to class XYZ
for the class
public class ABC {
private int a;
private String b;
@OneToMany
Private List<XYZ> c;
}
All that is needed at runtime. I am sure Hibernate knows all that at runtime, but I am not aware how to get these information.
cfg is an instance of Hibernate Configuration.
PersistentClass has all the info you need.