Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
arthur-liberman opened this issue Jun 26, 2024 · 3 comments
Open

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

arthur-liberman opened this issue Jun 26, 2024 · 3 comments
Labels

Comments

@arthur-liberman
Copy link

arthur-liberman commented Jun 26, 2024

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)
    }
}
@alexkeh
Copy link
Member

alexkeh commented Jun 26, 2024

Did this problem start occurring with EF Core 8.0.2?

If so, the problem could be the same as #362, which is a result of EF Core base bug: dotnet/efcore#33218

@arthur-liberman
Copy link
Author

It's not the same, I applied
AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue32325", true); and it solved another issue where strings were concatenated, but this issue remains.
Please try to reproduce, you should see that the workaround has no effect.

@alexkeh
Copy link
Member

alexkeh commented Jul 1, 2024

I was able to reproduce your error. I have filed a bug (36790369) to have the Oracle .NET dev team investigate. Thanks for reporting the issue!

@alexkeh alexkeh added the bug label Jul 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants