You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (Jira)" <ji...@apache.org> on 2023/02/22 12:35:00 UTC

[jira] [Updated] (CAY-2799) CHAR type support for Oracle

     [ https://issues.apache.org/jira/browse/CAY-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Timofeev updated CAY-2799:
---------------------------------
    Description: 
Here's a test case to illustrate this problem
{code}
@Test
    public void testASTLowerInWhere() throws Exception {
        // ARTIST_NAME is of char(254) type
        Artist a1 = createArtist("NAME");
        // a2 is null
        Artist a2 = ObjectSelect.query(Artist.class)
                .where(Artist.ARTIST_NAME.lower().eq("name")).selectOne(context);
        // a3 is a1
        Artist a3 = ObjectSelect.query(Artist.class)
                .where(Artist.ARTIST_NAME.lower().eq("name" + " ".repeat(250))).selectOne(context);
        assertEquals(a1, a3); // passed
        assertEquals(a1, a2); // failed
    }
{code}

> CHAR type support for Oracle
> ----------------------------
>
>                 Key: CAY-2799
>                 URL: https://issues.apache.org/jira/browse/CAY-2799
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Database integration
>         Environment: Oracle
>            Reporter: Nikita Timofeev
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2, 5.0.M1
>
>
> Here's a test case to illustrate this problem
> {code}
> @Test
>     public void testASTLowerInWhere() throws Exception {
>         // ARTIST_NAME is of char(254) type
>         Artist a1 = createArtist("NAME");
>         // a2 is null
>         Artist a2 = ObjectSelect.query(Artist.class)
>                 .where(Artist.ARTIST_NAME.lower().eq("name")).selectOne(context);
>         // a3 is a1
>         Artist a3 = ObjectSelect.query(Artist.class)
>                 .where(Artist.ARTIST_NAME.lower().eq("name" + " ".repeat(250))).selectOne(context);
>         assertEquals(a1, a3); // passed
>         assertEquals(a1, a2); // failed
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)