Skip to content

breeze-client / SaveOptions

Class: SaveOptions ​

Defined in: src/manager/save-options.ts:20

A SaveOptions instance is used to specify the 'options' under which a save will occur.

Constructors ​

Constructor ​

new SaveOptions(config?): SaveOptions

Defined in: src/manager/save-options.ts:43

Creates save options from a SaveOptionsConfig. Passed to EntityManager.saveChanges, they are used for that save in place of the manager's EntityManager.saveOptions - as a whole, not merged with them setting by setting.

ts
const so = new SaveOptions({ allowConcurrentSaves: true });
em.saveChanges(null, so);

Parameters ​

config? ​

SaveOptionsConfig

Returns ​

SaveOptions

Properties ​

allowConcurrentSaves ​

allowConcurrentSaves: boolean

Defined in: src/manager/save-options.ts:28

Whether multiple saves can be in-flight at the same time. The default is false. Read Only


dataService ​

dataService: DataService

Defined in: src/manager/save-options.ts:26

The DataService to be used for this save. Read Only


resourceName ​

resourceName: string

Defined in: src/manager/save-options.ts:24

Resource name to be used during the save - this defaults to "SaveChanges". Read Only


tag ​

tag: any

Defined in: src/manager/save-options.ts:30

Free form value that will be sent to the server during the save. Read Only


defaultInstance ​

static defaultInstance: SaveOptions

Defined in: src/manager/save-options.ts:33

The default value whenever SaveOptions are not specified.

Methods ​

setAsDefault() ​

setAsDefault(): any

Defined in: src/manager/save-options.ts:52

Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance. The current instance is returned unchanged.

Returns ​

any


using() ​

using(config): SaveOptions

Defined in: src/manager/save-options.ts:62

Returns a copy of this SaveOptions with the specified config options applied.

ts
var saveOptions = em1.saveOptions.using( {resourceName: "anotherResource" });

Parameters ​

config ​

SaveOptionsConfig

Returns ​

SaveOptions

Released under the MIT License.