jpa-spec
  1. jpa-spec
  2. JPA_SPEC-64

EntityGraph API has unspecified List/Map getters

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Labels:
      None

      Description

      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.

        Activity

        mkeith created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            mkeith
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: