-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
import Papr, { schema, types } from "papr";
const papr = new Papr();
const companySchema = schema({
name: types.string({ required: true }),
website: types.string({ required: true }),
});
const companyModel = papr.model("companies", companySchema);
await companyModel.upsert(
{
website: "example.com",
},
{
$set: {},
$setOnInsert: {},
},
);
I expect Papr to tell me "hey, in case I need to insert the data, you didn't specify all the properties of a company".
Currently behavior
There is no such error. Every field is considered as optional.
Metadata
Metadata
Assignees
Labels
No labels