Transaction Transaction = Session.begintransaction ();
Load is a primary key property that gets an instance of the object
Employee employee = (employee) session.load (Employee.class, 1);
Employee.setname ("demo");
Transaction.commit ();
Session.close ();
Error The method load (Class, Serializable) in the type Session was not applicable for the arguments (CLASS<T>, int)
MyEclipse obvious error, which means that the automatic unboxing of JDK in MyEclipse is not done automatically, but my JDK uses java8.
Use
Transaction Transaction = Session.begintransaction ();
Load is a primary key property that gets an instance of the object
Employee employee = (employee) session.load (Employee.class, New Integer (1));
Employee.setname ("demo");
Transaction.commit ();
Session.close ();
On the line, the Internet to find the next, found that this should be the hibernate version of the problem, in hibernate operation, depends on whether you refer to the Hibernate version itself supports automatic disassembly.
Hibernate itself is not allowed to do so, so it has to be written as an object type in order to query, which is irrelevant to the JDK.
The method Load (Class, Serializable) in the type Session was not applicable for the arguments (class<