Session: Saving changes

Pending session operations e.g. store, delete and many others will not be send to server till saveChanges is called.

Syntax

public void saveChanges();

Example

// storing new entity
Employee employee = new Employee();
employee.setFirstName("John");
employee.setLastName("Doe");
session.store(employee);

session.saveChanges();