We're updating the issue view to help you get more done. 

Incorrect binding of NVARCHAR column

Description

Hello,

I have this scenario: a table on DBMS Oracle 11 whit a column defined as CYR NVARCHAR2(255 CHAR) necessary to store cyrillic characters (ex š).

The classe and the interface defined as:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public class Dummy extends EntityWithCreationUpdateTime implements Serializable { @Nationalized @Column(columnDefinition = "NVARCHAR2(255)") private String cyr; // setter and getter } public interface DummyRepository extends JpaRepository<Dummy, Long>, JpaSpecificationExecutor<Dummy> { Dummy findByCyr(String cyr); Dummy findByCyrIgnoreCase(String cyr); }

when finding with findByCyr("charšandother"); the object is returned, instead the findByCyrIgnoreCase("charšandother") returns null.

From the log I can see that with findByCyr binding is done with NVARCHAR:
o.h.type.descriptor.sql.BasicBinder binding parameter [1] as [NVARCHAR] - [charšandother]

When using findByCyrIgnoreCase binding is done with VARCHAR:
o.h.type.descriptor.sql.BasicBinder binding parameter [1] as [VARCHAR] - [charšandother]

By now the value in the database is lower case "charšandother", in other fields defined as VARCHAR2 everything works fine, the binding is done correctly and the object is returned by the IgnoreCase method.

Environment

Oracle 11 Spring boot 1.3.3 and 1.4.1

Status

Assignee

Unassigned

Reporter

Gabriele Gianoglio

Priority

Minor