-
Notifications
You must be signed in to change notification settings - Fork 617
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
org.springframework.data.mapping.MappingException while trying to use multiple implementations #2761
Comments
Isn't Kotlin more strict about If this should be not null, the loading of the |
Yeah I'm sharing all my models, repo and graph(and it's building code), Models
Repository
Builder
After calling the Endpoint "localhost:8080\buildit"
After Executing endpoint "localhost:8080\getit"
|
Actually I added the whole code, then stored graph after executing the code, and Exception I got while retrieving it from the database. |
Thanks. This clarifies a lot. |
Thanks @meistermeier for the response. Actually while surfing on internet regarding this interface Problem I came to know about this github repo mentioned below. I will try using abstract classes and update you about that soon.. As of my understanding after your comment is interfaces are mainly used for multiple labels right, but in the reference doc it is given like I can give a parent type as a interface, can you please give me a clear understanding if I'm wrong. https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#mapping.annotations.node |
I have to admit that the documentation (with the Conclusion is: It is not a bug per-se but somehow really misleading example. It comes directly from our test sources but the test (obviously) only checks for the specific implementation instances of the interfaces but not the relationships within. On a personal note: Don't feel ignored over the next weeks since I will be on vacation and will continue on this when I come back. |
Thanks @meistermeier I understand that the docs misleads me, please let me know after docs are updated. |
It took a "little bit" longer to answer here because there were #2788 coming that also addressed better (node-annotated) interface support. And after I added this, I completely forgot to give an answer to your last comment. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Hi @meistermeier |
Hi I can able to create nodes and rels for multiple implementations..
I can able to store that in the neo4j db..
But when trying to retrieve it using Repository..
I'm getting a exception like
[ restartedMain] .n.c.Neo4jPersistenceExceptionTranslator : Don't know how to translate exception of type class org.springframework.data.mapping.MappingException
Caused by: org.springframework.data.mapping.model.MappingInstantiationException: Failed to instantiate com.zen.neo.NeoTestKotlinNew.model.WebDataRetriever using constructor fun
(kotlin.Long, kotlin.String, kotlin.String, kotlin.String, com.zen.neo.NeoTestKotlinNew.model.WebDataProcessor): com.zen.neo.NeoTestKotlinNew.model.WebDataRetriever with arguments 1,webDataRetriever,getWebData,getSrc,null
It's is not mapping to the model correctly! can someone help me to solve this issue!!
SDN version - 6.3.12(from Spring Data Neo4j Starter)
Thanks
The text was updated successfully, but these errors were encountered: