klyn.data.EntityManager.saveChanges
method
public saveChanges() as Int:
Description

Synchronizes pending unit-of-work changes with the provider.

SQL mutations require an active transaction. Inserts, changed-property updates and deletes are prepared statements, and generated identities are assigned before this method returns.

Returns

Number of distinct entities synchronized.

Throws
  • TransactionRequiredException when durable changes are pending without an active transaction.
  • OptimisticLockException when an update or delete affects no row.
Example
changed = manager.saveChanges()