neo4j / sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
https://neo4j.github.io/sdn-rx
Apache License 2.0
65 stars 23 forks source link

Add chapter about projection #199

Closed meistermeier closed 4 years ago

meistermeier commented 4 years ago

Currently there is no information in the documentation that explains the projection support.

haris-zynka commented 4 years ago

Hi, I was wondering about this. I'm not sure if something like copy-pasting with some modification of this would help.

On the other hand it didn't work with Kotlin interfaces, I tried it, it has problems with val/var at least when I had

@get:Transient 
val somefiled: String

If I could research a bit more about this I could add documentation on it plus the Kotlin side. If you know there's no support for Kotlin please do tell me so I don't research as much.

meistermeier commented 4 years ago

If you are referring to the @Transient attribute, you might be right. I could check this later but I am pretty sure that we do not support those entity-related annotations in the projection classes. On the other hand it does not make much sense to have such fields because the classes themself should be the database's data wrapper.

haris-zynka commented 4 years ago

If you are referring to the @Transient attribute, you might be right. I could check this later but I am pretty sure that we do not support those entity-related annotations in the projection classes. On the other hand it does not make much sense to have such fields because the classes themself should be the database's data wrapper.

You're right. I just had interface which I need to have such field to force implementation to have it. I use data class as a different approach to test out stuff. I asked about Spring Docs link because I'm wondering is there a way for us to contribute just a little bit since I don't have such skills to actually fix bugs or add features so at least some small change to documentation would be nice from devs like me until I get to know framework a bit better.

meistermeier commented 4 years ago

Thanks for you offer. As you already said, it might be the easiest to just adapt the commons documentation and modify it slightly. In general I oriented myself on this part of the documentation to implement the projections in SDN/RX. So it might be not so much to align it with the current behaviour. Take a look at the structure that is already in place for including parts of Spring Data Commons like in this folder https://github.com/neo4j/sdn-rx/tree/master/docs/object-mapping If you have any code to reference instead of the examples in the Commons documentation, you can add it to this (https://github.com/neo4j/sdn-rx/tree/master/examples/docs) example project.

haris-zynka commented 4 years ago

Thanks for you offer. As you already said, it might be the easiest to just adapt the commons documentation and modify it slightly. In general I oriented myself on this part of the documentation to implement the projections in SDN/RX. So it might be not so much to align it with the current behaviour. Take a look at the structure that is already in place for including parts of Spring Data Commons like in this folder https://github.com/neo4j/sdn-rx/tree/master/docs/object-mapping If you have any code to reference instead of the examples in the Commons documentation, you can add it to this (https://github.com/neo4j/sdn-rx/tree/master/examples/docs) example project.

Thanks, I'll look into this but I doubt that I have anything extra, but if I do I know where to push it.

michael-simons commented 4 years ago

@haris-zynka: I can only agree to Gerrit. We would appreciate docs contributions a lot. You'll find the source of the docs in https://github.com/neo4j/sdn-rx/tree/master/docs

michael-simons commented 4 years ago

Closed with 6ec614c2ad09b2e26d818315d0e942a5577f63a2