If name attribute (class element) is optional, how does Hibernate know to which class to map the table?

516 views Asked by At

As per documentation (search 'name (optional): the fully' string to locate the sentence), name attribute of class element is optional in mapping (hbm.xml) file. If so, how does Hibernate know to which class to map the table?

Thanks in advance.

1

There are 1 answers

1
crybird On

name (optional): the fully qualified Java class name of the persistent class or interface. If this attribute is missing, it is assumed that the mapping is for a non-POJO entity.