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

EntityGraph API has unspecified List/Map getters #64

Open
lukasj opened this issue Aug 27, 2013 · 4 comments
Open

EntityGraph API has unspecified List/Map getters #64

lukasj opened this issue Aug 27, 2013 · 4 comments

Comments

@lukasj
Copy link
Contributor

lukasj commented Aug 27, 2013

The List/Map getter methods (e.g. getAttributeNodes()) on EntityGraph, AttributeNode, and Subgraph do not specify whether the List/Map returned is a mutable one or a copy. They should be specified as returning the exact collections so the collections can be mutated. If it is a copy then the ability to mutate an existing named entity graph using createEntityGraph(String) is quite limited. There would be no way to remove an attribute node or a subgraph, or for that matter even add a subgraph for an existing attribute node.

The alternative to returning the actual collections is to add methods to the API to enable the additional mutating operations.

@lukasj
Copy link
Contributor Author

lukasj commented Aug 27, 2013

@glassfishrobot Commented
Reported by mkeith

@lukasj
Copy link
Contributor Author

lukasj commented May 5, 2017

@glassfishrobot Commented
This issue was imported from java.net JIRA JPA_SPEC-64

@lukasj
Copy link
Contributor Author

lukasj commented Aug 31, 2018

@gavinking
Copy link
Contributor

There would be no way to remove an attribute node or a subgraph, or for that matter even add a subgraph for an existing attribute node.

This is at least partially addressed in #454.

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

No branches or pull requests

2 participants