3

I have an an application in which i want to migrate the jar from hibernate 3.6 to hibernate 5. it is throwing error.

The method entity(Class<Realty>) is undefined for the type Hibernate 

The code that is i am writing is:--

query.setParameter("objectTableInformation", contractObject.getTableMetaInformation(), Hibernate
     .entity(SysTableInformation.class));

Please suggest me what i need to give in place of :-

Hibernate.entity(SysTableInformation.class)
Bacteria
  • 8,406
  • 10
  • 50
  • 67

1 Answers1

0

Use following :-

session.getTypeHelper().entity(SysTableInformation.class);
//where session is your session object
Avis
  • 2,197
  • 18
  • 28