IBM Support

PH36828: ECLIPSELINK SUPPORT FOR EMBEDDABLE FIELDS AS JOIN TARGETS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • EclipseLink throws an exception for JPQL and CriteriaBuilder
    queries if they attempt to JOIN on fields of Embeddable type.
    However, performing these JOINs on Embeddable fields is
    supported by the JPA specification.
    
    Exception example:
    ´´´
    org.eclipse.persistence.exceptions.JPQLException
    Exception Description: Problem compiling [SELECT e FROM
    Employee e JOIN e.contactInfo
    c JOIN c.phones p].
    [30, 43] The collection-valued path 'e.contactInfo' must
    resolve to an association field.
    ´´´
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server - Java Persistence API - JPA 2.1 &   *
    *                  EclipseLink                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink throws an exception for     *
    *                      JPQL and CriteriaBuilder                *
    *                      queries if they attempt to JOIN on      *
    *                      fields of Embeddable type.              *
    *                      However, performing these JOINs on      *
    *                      Embeddable fields is                    *
    *                      supported by the JPA specification.     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Eclipselink doesnt support JOINs against Embeddable fields,
    but the JPA specification describes that it should be supported
    Example Query:
    ´´´
    SELECT p.vendor FROM Employee e JOIN e.contactInfo c JOIN
    c.phones p WHERE e.contactInfo.address.zipcode = '95054'
    ´´´
    Example exception:
    ´´´
    JPQLException
    Exception Description: Problem compiling [SELECT e FROM
    Employee e JOIN e.contactInfo c JOIN c.phones p].
    [30, 43] The collection-valued path 'e.contactInfo' must
    resolve to an association field.
    at
    org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildExce
    ption(HermesParser.java:155)
    at
    org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(
    HermesParser.java:347)
    at
    org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQ
    ueryImp(HermesParser.java:278)
    at
    org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuer
    y(HermesParser.java:163)
    ´´´
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PH36828

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-04-29

  • Closed date

    2021-07-07

  • Last modified date

    2021-07-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R900 PSY

       UP

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"900"}]

Document Information

Modified date:
16 July 2021