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 for persistence constructors [DATAGRAPH-1056] #1618

Closed
spring-projects-issues opened this issue Dec 29, 2017 · 1 comment
Closed

Support for persistence constructors [DATAGRAPH-1056] #1618

spring-projects-issues opened this issue Dec 29, 2017 · 1 comment
Labels
in: core in: ogm type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Dec 29, 2017

Nicolas Mervaillie opened DATAGRAPH-1056 and commented


Issue Links:

  • DATAGRAPH-341 Support for PersistenceConstructor
    ("duplicates")

Referenced from: commits 11c93dd, 2af6a45, 2803a4f

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jan 19, 2018

Nicolas Mervaillie commented

This first implementation allows to use persistence constructors with some limitations (see docs).

One of them is that properties used in constructors of domain classes cannot be marked final.
ATM, final fields are skipped by OGM at scanning time.
This should be changed at the OGM level, retaining these final fields as legitimate when they are part of constructor parameters.
For this we have to match field names with constructor parameter names, and thus OGM has to be aware of the parameter names
It is not the case at the moment.

A second pain point is to handle relationships as constructor parameters.
At the moment, the OGM mapping is done in 2 phases : map the nodes, then the relationships (and relationship entites).
Have rels as parameters would require to change the mapping process in OGM. Maybe another option would be to use proxies in order to hydrate entities lazily as they are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core in: ogm type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant