You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my parent schema, and it is extended by 2 child schemas Car and Truck.
Car.collection.insert([{'photo':'/civic.jpg'},{'photo':'/accord.jpg'}], function (err) {})
Truck.collection.insert([{'photo':'/sierra.jpg'},{'photo':'/titan.jpg'}], function (err) {})
But unlike your example, I used insert as I wanted create records in bulk.
and after the insertion, I don't see '_type' field populated in the items collection.
So I was wondering if the 'discriminatorKey' only works for save() and not for insert().
Could you share some insight on this matter? Thanks!
The text was updated successfully, but these errors were encountered:
This is my parent schema, and it is extended by 2 child schemas Car and Truck.
But unlike your example, I used insert as I wanted create records in bulk.
and after the insertion, I don't see '_type' field populated in the items collection.
So I was wondering if the 'discriminatorKey' only works for save() and not for insert().
Could you share some insight on this matter? Thanks!
The text was updated successfully, but these errors were encountered: