1- using System ;
1+ using System ;
2+ using System . Collections . Generic ;
23using System . Linq ;
34using System . Threading . Tasks ;
45using Microsoft . EntityFrameworkCore ;
@@ -1229,17 +1230,24 @@ await Test(
12291230 e . Property < string > ( "Name" ) ;
12301231 e . Property < string > ( "Brand" )
12311232 . HasCharSet ( NonDefaultCharSet ) ;
1233+
1234+ e . ComplexProperty < Dictionary < string , object > > ( "ComplexProperty" )
1235+ . Property < string > ( "Brand" )
1236+ . HasCharSet ( NonDefaultCharSet ) ;
12321237 } ) ,
12331238 result =>
12341239 {
12351240 var table = Assert . Single ( result . Tables ) ;
12361241 var nameColumn = Assert . Single ( table . Columns . Where ( c => c . Name == "Name" ) ) ;
12371242 var brandColumn = Assert . Single ( table . Columns . Where ( c => c . Name == "Brand" ) ) ;
1243+ var complexBrandColumn = Assert . Single ( table . Columns . Where ( c => c . Name == "ComplexProperty_Brand" ) ) ;
12381244
12391245 Assert . Null ( nameColumn [ MySqlAnnotationNames . CharSet ] ) ;
12401246 Assert . Null ( nameColumn . Collation ) ;
12411247 Assert . Equal ( NonDefaultCharSet , brandColumn [ MySqlAnnotationNames . CharSet ] ) ;
12421248 Assert . NotEqual ( DefaultCollation , brandColumn . Collation ) ;
1249+ Assert . Equal ( NonDefaultCharSet , complexBrandColumn [ MySqlAnnotationNames . CharSet ] ) ;
1250+ Assert . NotEqual ( DefaultCollation , complexBrandColumn . Collation ) ;
12431251 } ) ;
12441252
12451253 AssertSql (
@@ -1249,6 +1257,7 @@ await Test(
12491257 `IceCreamId` int NOT NULL AUTO_INCREMENT,
12501258 `Brand` longtext CHARACTER SET { NonDefaultCharSet } NULL,
12511259 `Name` longtext COLLATE { DefaultCollation } NULL,
1260+ `ComplexProperty_Brand` longtext CHARACTER SET { NonDefaultCharSet } NULL,
12521261 CONSTRAINT `PK_IceCream` PRIMARY KEY (`IceCreamId`)
12531262) COLLATE={ DefaultCollation } ;" ) ;
12541263 }
0 commit comments