0

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.

user1418717
  • 425
  • 2
  • 5
  • 13

1 Answers1

0

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.

crybird
  • 111
  • 1
  • 7
  • Lets say if an application has three (A, B, C) POJO entities and three(X, Y, Z) non-POJO entities. A mapping file contains .... Note: class attribute does not specify 'name' element. So, in this case, to which entity does Hibernate associate USER table? Moreover, documentation reads - '..it is assumed..'. – user1418717 May 28 '12 at 10:29