Issue Details (XML | Word | Printable)

Key: JPA_SPEC-64
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: mkeith
Votes: 2
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
jpa-spec

EntityGraph API has unspecified List/Map getters

Created: 27/Aug/13 04:58 AM   Updated: 27/Aug/13 04:58 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Tags:
Participants: mkeith


 Description  « Hide

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.



There are no comments yet on this issue.