Cayenne
  1. Cayenne
  2. CAY-1470

Oracle: Problem with bind CHAR in select

    Details

      Description

      I have Table tUser

      desc tUser
      Name Null Type
      ------------------------------ --------
      USERID NOT NULL NUMBER(15)
      BRIEF NOT NULL CHAR(30)

      And wish to find user with BRIEF 'credit' :

      INFO QueryLogger: Detected and installed adapter: org.apache.cayenne.dba.oracle.OracleAdapter
      INFO QueryLogger: SELECT * FROM tUser WHERE Brief = ? [bind: 'credit']
      INFO QueryLogger: === returned 0 rows. - took 125 ms.

      But if I try whitespaces at the end I would get:

      INFO QueryLogger: SELECT * FROM tUser WHERE Brief = ? [bind: 'credit ']
      INFO QueryLogger: === returned 1 row. - took 109 ms.

      It's absolutely not CROSS DB behavior!

      1. CAY-1470.patch
        4 kB
        Evgeny Ryabitskiy
      2. CAY-1470.patch
        6 kB
        Evgeny Ryabitskiy
      3. CAY-1470.patch
        6 kB
        Evgeny Ryabitskiy
      4. CAY-1470-Test.patch
        1 kB
        Evgeny Ryabitskiy

        Activity

        Evgeny Ryabitskiy created issue -
        Evgeny Ryabitskiy made changes -
        Field Original Value New Value
        Fix Version/s 3.0.1 [ 12314876 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470.patch [ 12451254 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470.patch [ 12451318 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470.patch [ 12451333 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470.patch [ 12451333 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470.patch [ 12451334 ]
        Evgeny Ryabitskiy made changes -
        Attachment CAY-1470-Test.patch [ 12454838 ]
        Andrus Adamchik made changes -
        Fix Version/s 3.1 (final) [ 12316229 ]
        Fix Version/s 3.1M1 [ 12314299 ]
        Ari Maniatis made changes -
        Labels 3.1-review
        Andrus Adamchik made changes -
        Fix Version/s Undefined future [ 12313763 ]
        Fix Version/s 3.1 [ 12316229 ]

          People

          • Assignee:
            Evgeny Ryabitskiy
            Reporter:
            Evgeny Ryabitskiy
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development