Language
C#
Article For
1.0 2.0 2.5 3.5 4.0 4.1 4.2 5.0 5.1 5.2

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();