File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/main/java/org/springframework/data/neo4j/core/mapping Expand file tree Collapse file tree 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
7070 this .graphPropertyName = Lazy .of (this ::computeGraphPropertyName );
7171 this .isAssociation = Lazy .of (() -> {
7272
73+ // Bail out early, this is pretty much explicit
74+ if (isAnnotationPresent (Relationship .class )) {
75+ return true ;
76+ }
7377 Class <?> targetType = getActualType ();
7478 return !(simpleTypeHolder .isSimpleType (targetType ) || this .mappingContext .hasCustomWriteTarget (targetType )
7579 || isAnnotationPresent (TargetNode .class ) || isComposite () || isAnnotationPresent (ConvertWith .class ));
@@ -166,14 +170,11 @@ private TypeInformation<?> getRelationshipPropertiesTargetType(Class<?> relation
166170 @ Override
167171 public Class <?> getAssociationTargetType () {
168172
169- Class <?> associationTargetType = super .getAssociationTargetType ();
170- if (associationTargetType != null ) {
171- return associationTargetType ;
172- } else if (isDynamicOneToManyAssociation ()) {
173+ if (isDynamicOneToManyAssociation ()) {
173174 TypeInformation <?> actualType = getTypeInformation ().getRequiredActualType ();
174175 return actualType .getRequiredComponentType ().getType ();
175176 } else {
176- return null ;
177+ return getActualType () ;
177178 }
178179 }
179180
You can’t perform that action at this time.
0 commit comments