Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const modelInstance = new RegisterModel({
- cred: {
- nameValue: 'Sample',
- emailValue: 'sample@gmail.com',
- passwordValue: 'sample122',
- },
- location: {
- addressValue: 'sample address',
- cityValue: 'sample',
- stateValue: 'sample',
- postalValue: 123344,
- },
- card: {
- cardName: 'Sample',
- cardNumber: 231232143,
- securityCode: 131,
- expirationMonth: 1,
- expirationYear: 2022,
- },
- })
- modelInstance.save(function (err) {
- console.log('@@@@@ Inside the callback ', err);
- if (err) {
- console.log('the error is ', err);
- }
- console.log('saved the model instance @@@@@@');
- console.log(modelInstance, '@@@@@Helllo@@@@@');
- });
- modelInstance.find({postalValue: 123344 }).then(model=>
- console.log('model@@@',model)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement