File tree 1 file changed +6
-5
lines changed
src/main/java/org/springframework/data/neo4j/core/mapping
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ final class DefaultNeo4jPersistentProperty extends AnnotationBasedPersistentProp
70
70
this .graphPropertyName = Lazy .of (this ::computeGraphPropertyName );
71
71
this .isAssociation = Lazy .of (() -> {
72
72
73
+ // Bail out early, this is pretty much explicit
74
+ if (isAnnotationPresent (Relationship .class )) {
75
+ return true ;
76
+ }
73
77
Class <?> targetType = getActualType ();
74
78
return !(simpleTypeHolder .isSimpleType (targetType ) || this .mappingContext .hasCustomWriteTarget (targetType )
75
79
|| isAnnotationPresent (TargetNode .class ) || isComposite () || isAnnotationPresent (ConvertWith .class ));
@@ -166,14 +170,11 @@ private TypeInformation<?> getRelationshipPropertiesTargetType(Class<?> relation
166
170
@ Override
167
171
public Class <?> getAssociationTargetType () {
168
172
169
- Class <?> associationTargetType = super .getAssociationTargetType ();
170
- if (associationTargetType != null ) {
171
- return associationTargetType ;
172
- } else if (isDynamicOneToManyAssociation ()) {
173
+ if (isDynamicOneToManyAssociation ()) {
173
174
TypeInformation <?> actualType = getTypeInformation ().getRequiredActualType ();
174
175
return actualType .getRequiredComponentType ().getType ();
175
176
} else {
176
- return null ;
177
+ return getActualType () ;
177
178
}
178
179
}
179
180
You can’t perform that action at this time.
0 commit comments