-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch update boolean type error with Oracle.EntityFrameworkCore: ORA-00932 #682
Comments
Hello @NepPure , Do you think you could provide a runnable project sample for this issue? It will help my developer to get started to investigate it faster and make sure nothing is missing. The last time someone reported us this error, a converter was missing on his side: protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<EntitySimpleBool>().Property(x => x.IsDeleted).HasConversion(x => x ? 1 : 0, x => x == 1);
} Providing a project sample is now REQUIRED. It happened too many times that something was missing to investigate and/or answer an issue. Try to create a new project with only the minimal code (having too many non-related codes doesn’t help either). You can send it to [email protected] if you need to keep the source private Best Regards, Jon Performance Libraries Runtime Evaluation |
Thank you very much, I will try it as soon. My project needs to support multiple relational database types at the same time. I think this conversion should only apply to Oracle. The configuration here seems unreasonable, or when using Oracle database, should I add a global conversion like this to the Bool type? Should it be built into the Oracle of Z.EntityFramework.Plus? There is no problem in updating the Bool type using EFCore's native method. |
We already tried to fix it by default through another request but meanwhile, the only solution is to add a conversion when you are using the Oracle provider. You probably know when your context uses Oracle so you can add a condition here. As said, we already working to make it works by default. So it might get fixed in the upcoming week. |
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<EntitySimpleBool>().Property(x => x.IsDeleted).HasConversion(x => x ? 1 : 0, x => x == 1);
} When code first, add conversion like this will change the migration. |
Z.EntityFramework.Plus v5.1.33.0
Oracle.EntityFrameworkCore v5.21.1 with Oracle 19
ora-00932 inconsistent datatypes expected number got boolean
The text was updated successfully, but these errors were encountered: