Skip to content

EF Core 8.0: ORA-00932 - expected - got CLOB #389

Open
@arthur-liberman

Description

@arthur-liberman

Hi, I think this issue might be related to an earlier issue #296 I opened, or maybe not.
It's very easy to reproduce.
Consider this query (not very imaginative, but it reproduces)
var res = await dbContext.Categories.Where(c=>c.Name.Contains(c.SubName)).ToListAsync();

  • Please note that in case of NVARCHAR2 and NCLOB combination there is the same problem.
public class Category
{
    public int CatId { get; set; }
    public string Name { get; set; }
    public string SubName { get; set; }
    public string Description { get; set; }
}
public class CategoryConfiguration : IEntityTypeConfiguration<Category>
{
    public void Configure(EntityTypeBuilder<Category> builder)
    {
        builder.ToTable("Category");
        builder.HasKey(o => o.CatId);
        builder.Property(t => t.CatId).ValueGeneratedOnAdd();
        builder.Property(t => t.Name).HasMaxLength(int.MaxValue); // CLOB
        builder.Property(t => t.SubName).HasMaxLength(256);       // VARCHAR2(256)
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions