glassfish
  1. glassfish
  2. GLASSFISH-20949

@NamedAttributeNode for elements collections not fetching collection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: entity-persistence
    • Labels:
      None

      Description

      JSR-338 page 118

      If the attribute is an element collection of basic type, and the attribute is specified in an
      attribute node, the element collection together with its basic elements is fetched.

      IMHO the following example should fetch all elements for attribute strList.
      (or have I missinterpreted JSR-338?)

      @Entity(name="JEE7graphattr")
      @Table(name = "JEE7graphattr")
      @NamedEntityGraph(attributeNodes = {@NamedAttributeNode("strList") })
      public class EntityGraphFetchWithAttribute {
      @Id
      @GeneratedValue
      private long id;
      @ElementCollection
      @CollectionTable(name="JEE7graphattr_strList")
      private List<String> strList;

      However, PU_util.isLoaded(o, "strList"); returns false and the server.log does not show any query on JEE7grapattr_strList

        Activity

        Hide
        reza_rahman added a comment -

        Issue resolved by user.

        Show
        reza_rahman added a comment - Issue resolved by user.

          People

          • Assignee:
            Mitesh Meswani
            Reporter:
            ChristianSch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: