File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8959,14 +8959,14 @@ describe('model: populate:', function() {
8959
8959
it ( 'succeeds with refPath if embedded discriminator has path with same name but no refPath (gh-8452)' , function ( ) {
8960
8960
const ImageSchema = Schema ( { imageName : String } ) ;
8961
8961
const Image = db . model ( 'gh8452_Image' , ImageSchema ) ;
8962
-
8962
+
8963
8963
const TextSchema = Schema ( { textName : String } ) ;
8964
8964
const Text = db . model ( 'gh8452_Text' , TextSchema ) ;
8965
-
8965
+
8966
8966
const opts = { _id : false } ;
8967
8967
const ItemSchema = Schema ( { objectType : String } , opts ) ;
8968
8968
const ItemSchemaA = Schema ( {
8969
- data : {
8969
+ data : {
8970
8970
type : ObjectId ,
8971
8971
refPath : 'list.objectType'
8972
8972
} ,
@@ -8976,7 +8976,7 @@ describe('model: populate:', function() {
8976
8976
data : { sourceId : Number } ,
8977
8977
objectType : String ,
8978
8978
} , opts ) ;
8979
-
8979
+
8980
8980
const ExampleSchema = Schema ( { test : String , list : [ ItemSchema ] } ) ;
8981
8981
ExampleSchema . path ( 'list' ) . discriminator ( 'gh8452_ExtendA' , ItemSchemaA ) ;
8982
8982
ExampleSchema . path ( 'list' ) . discriminator ( 'gh8452_ExtendB' , ItemSchemaB ) ;
You can’t perform that action at this time.
0 commit comments