Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support [At]TargetNode properties in persistence constructors. [DATAGRAPH-1395] #1956

Closed
spring-projects-issues opened this issue Oct 1, 2020 · 2 comments
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Oct 1, 2020

benkuly opened DATAGRAPH-1395 and commented

I'm getting Error mapping Record<{n: {__internalNeo4jId__: 4, roomId: "someRoomId1", __nodeLabels__: ["AppserviceRoom"], AppserviceRoom_MEMBER_OF_AppserviceUser: [{__internalNeo4jId__: 6, __relationship__: relationship<4>, userId: "someUserId3", isManaged: FALSE, __nodeLabels__: ["AppserviceUser"]}, {__internalNeo4jId__: 5, __relationship__: relationship<3>, userId: "someUserId1", isManaged: FALSE, __nodeLabels__: ["AppserviceUser"]}]>}} due to java.lang.NullPointerException: Parameter specified as non-null is null when using @TargetNode in a @RelationshipProperties data class.

@RelationshipProperties
data class MemberOfProperties(
        @TargetNode
        val member: AppserviceUser,

        @Property("mappingToken")
        val mappingToken: Int
)

 

 


Affects: 6.0 RC1 (2020.0.0)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 1, 2020

Gerrit Meier commented

Thanks for reporting this. Right now the @TargetNode does not work for constructor parameters. So this also includes the "raw" Java world.

Will look into this.

Could you please confirm that my assumption is right that the MemberOfProperties are used in a class that is not AppserviceUser?
Also it would be good to know if you have any logical cycles in your Java model schema. Obviously such scenarios will lead to a hen / egg problem

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 1, 2020

benkuly commented

I can confirm both. MemberOfProperties ist part of class AppserviceRoom and there are no cycles (AppserviceRoom has List of MemberOfProperties, which contains AppserviceUser)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants