File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
main/java/org/springframework/data/mapping/model
test/java/org/springframework/data/mapping/model Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2020import java .lang .reflect .Modifier ;
2121import java .util .Collections ;
2222import java .util .HashSet ;
23- import java .util .Map ;
2423import java .util .Optional ;
2524import java .util .Set ;
2625import java .util .stream .Collectors ;
@@ -318,7 +317,7 @@ public boolean isCollectionLike() {
318317 */
319318 @ Override
320319 public boolean isMap () {
321- return Map . class . isAssignableFrom ( getType () );
320+ return information . isMap ( );
322321 }
323322
324323 /*
Original file line number Diff line number Diff line change @@ -238,6 +238,14 @@ void detectsJMoleculesAssociation() {
238238 .containsExactly ((Class ) JMoleculesAggregate .class );
239239 }
240240
241+ @ Test // #2549
242+ void considersVavrMaps () {
243+
244+ SamplePersistentProperty property = getProperty (VavrWrapper .class , "vavrMap" );
245+
246+ assertThat (property .isMap ()).isTrue ();
247+ }
248+
241249 private <T > BasicPersistentEntity <T , SamplePersistentProperty > getEntity (Class <T > type ) {
242250 return new BasicPersistentEntity <>(ClassTypeInformation .from (type ));
243251 }
@@ -399,4 +407,8 @@ class JMolecules {
399407 interface JMoleculesAggregate extends AggregateRoot <JMoleculesAggregate , Identifier > {
400408
401409 }
410+
411+ class VavrWrapper {
412+ io .vavr .collection .Map <String , String > vavrMap ;
413+ }
402414}
You can’t perform that action at this time.
0 commit comments