Create Untracked Entity - Agrejus/pouchdb-entity-fabric GitHub Wiki
A DbSet can create untracked entities if needed. This is useful to create an entity to ensure it matches the shape of the DbSet. When add() is used, entities are automatically tracked.
export class PouchDbDataContext extends DataContext<DocumentTypes> {
myFirstDbSet = this.dbset().default<IMyFirstEntity>(DocumentTypes.MyFirstDocument).create();
}
const context = new PouchDbDataContext();
const [addedDocument] = await context.myFirstDbSet.instance({
propertyOne: "some value",
propertyTwo: "some other value"
});
await context.saveChanges(); // no changes saved