Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-76

@MappedSuperclass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V2 1.0.0
    • V2 1.1.0
    • odata2-jpa
    • None

    Description

      When i use @MappedSuperclass i got the error below:

      Caused by: java.lang.NoSuchFieldException: creationDate
      at java.lang.Class.getDeclaredField(Class.java:1938)
      at org.apache.olingo.odata2.processor.core.jpa.access.model.JPATypeConvertor.convertToEdmSimpleType(JPATypeConvertor.java:83)
      ... 75 more

      I suppose this is an error because the method olingo.odata2.processor.core.jpa.access.model.JPATypeConvertor.convertToEdmSimpleType should not use getDeclaredField (), but getFields () to search also the attributes of the parent class.

      try {
      if ((currentAttribute != null)
      && (currentAttribute.getDeclaringType().getJavaType().getDeclaredField(currentAttribute.getName())
      .getAnnotation(Temporal.class).value() == TemporalType.TIME))

      { return EdmSimpleTypeKind.Time; }

      else

      { return EdmSimpleTypeKind.DateTime; }

      } catch (NoSuchFieldException e)

      { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); } catch (SecurityException e) { throw ODataJPAModelException.throwException(ODataJPAModelException.GENERAL.addContent(e.getMessage()), e); }

      Attachments

        1. AbstractEntity.java
          7 kB
          Thiago Assis
        2. ExternalUser.java
          3 kB
          Thiago Assis
        3. ExternalUserProvider.java
          2 kB
          Thiago Assis
        4. InternalUser.java
          2 kB
          Thiago Assis
        5. InternalUserPassword.java
          1 kB
          Thiago Assis

        Activity

          People

            chandan.v.a Chandan V.A
            thiago.assis Thiago Assis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: