Skip to content

ORA-00932 exception: inconsistent datatypes: expected CHAR ; got NCLOB #362

@kakone

Description

@kakone

With EF Core 8.0.2 and Oracle.EntityFrameworkCore 8.21.121, when I concatenate non unicode strings, I got an ORA-00932 exception.

var author = (from b in dbContext.Books select b.AuthorFirstName + " " + b.AuthorLastName).FirstOrDefault();

The generated SQL is

SELECT (COALESCE("b"."AuthorFirstName", NULL) || N' ') || COALESCE("b"."AuthorLastName", TO_NCLOB(N''))

instead of

SELECT (COALESCE("b"."AuthorFirstName", NULL) || ' ') || COALESCE("b"."AuthorLastName", NULL)

This is a sample project that reproduces the problem : Oracle00932

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions