Does the Hibernate API have an entity identifier field value for reading? In my case, this will be the value Serializablereturned by the field annotated with @Id. For example, suppose I have an object Person:
class Person {
@Id private long id;
}
Person p = new Person();
p.setId(42L);
Hibernate.unknownFunction(p);
Of course, I could read the annotations to find the field @Idmyself, but it looks like it could be inline.
source
share