Skip to content

Oracle and Postgres using DOUBLE instead of DOUBLE PRECISION for CAST #2776

Description

@mswatosh

Describe the bug
Oracle and Postgres expect DOUBLE PRECISION instead of DOUBLE when using CAST

Postgres gives: Internal Exception: org.postgresql.util.PSQLException: ERROR: type "double" does not exist
Oracle gives ORA-02000

To Reproduce
Steps/resources to reproduce the behavior:

    List<?> results = em.createQuery(
            "SELECT f FROM Fraction f WHERE CAST(f.numerator AS Double) > :lo",
            Fraction.class)
        .setParameter("lo", 4.0)
        .getResultList();
  • EclipseLink version
    5.0.0.v202603230926-bc4f4eb36eb1dcce223533d87890ba458628a2f9
  • Java/JDK version
    11

Expected behavior
Oracle and Postgres should be able to use CAST AS Double as expected, using DOUBLE PRECISION instead of DOUBLE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions