Language
Java
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

void SaveChanges();

Example

// storing new entity
session.Store(new Employee
	              {
		              FirstName = "John", 
					  LastName = "Doe"
	              });

session.SaveChanges();