Skip to content

Support for temporary entites #197

@jmdobry

Description

@jmdobry

Something like:

Foo.inject({ id: 1, foo: 'baz' });
Foo.filter().length; // 1

var foo = Foo.inject({ foo: 'bar' }, { temporary: true });
foo.id; // "3849e94d-0d58-4088-ba61-b690d420bff6"
Foo.filter().length; // 2
Foo.filter(null, { includeTemporary: false }).length; // 1
foo.DSIsNew(); // true

// or foo.DSSave()
foo.DSCreate().then(function (foo) {
  foo.id; // 2
  foo.DSIsNew(); // false
});

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions