@@ -296,6 +296,9 @@ private Assignment forge( ) {
296296 else if ( sourceType .isMapType () && targetType .isMapType () ) {
297297 assignment = forgeMapMapping ( sourceType , targetType , rightHandSide );
298298 }
299+ else if ( sourceType .isMapType () && !targetType .isMapType ()) {
300+ assignment = forgeMapToBeanMapping ( sourceType , targetType , rightHandSide );
301+ }
299302 else if ( ( sourceType .isIterableType () && targetType .isStreamType () )
300303 || ( sourceType .isStreamType () && targetType .isStreamType () )
301304 || ( sourceType .isStreamType () && targetType .isIterableType () ) ) {
@@ -690,6 +693,19 @@ private Assignment forgeMapMapping(Type sourceType, Type targetType, SourceRHS s
690693 return createForgedAssignment ( source , methodRef , mapMappingMethod );
691694 }
692695
696+ private Assignment forgeMapToBeanMapping (Type sourceType , Type targetType , SourceRHS source ) {
697+
698+ targetType = targetType .withoutBounds ();
699+ ForgedMethod methodRef = prepareForgedMethod ( sourceType , targetType , source , "{}" );
700+
701+ BeanMappingMethod .Builder builder = new BeanMappingMethod .Builder ();
702+ final BeanMappingMethod mapToBeanMappingMethod = builder .mappingContext ( ctx )
703+ .forgedMethod ( methodRef )
704+ .build ();
705+
706+ return createForgedAssignment ( source , methodRef , mapToBeanMappingMethod );
707+ }
708+
693709 private Assignment forgeMapping (SourceRHS sourceRHS ) {
694710 Type sourceType ;
695711 if ( targetWriteAccessorType == AccessorType .ADDER ) {
0 commit comments