I have just updated from NET7 to NET8. Also updated all MS packages to 8.0.7.
Have listed some of the packages including EF for Oracle.
<PackageReference Include="EntityFrameworkCore.Exceptions.Oracle" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.7" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.23.50" />
Before I upgraded, I could run this query, without any problems
[HttpGet("CanDelete/{id:long}")]
public async Task<ActionResult<bool>> CanDelete(long id)
{
var inUse = await _dbContext.CompositeFunds.AnyAsync(x => x.FundId == id);
return Ok(!inUse);
}
Now it creates this sql and fail on True/False
[10:49:05 ERR] Failed executing DbCommand (67ms) [Parameters=[:id_0='1033'], CommandType='Text', CommandTimeout='0']
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM "PERFORMANCE"."COMPOSITE_FUND" "c"
WHERE "c"."FUND" = :id_0) THEN True
ELSE False
END FROM DUAL
[10:49:05 ERR] 2024-08-08 10:49:05.139123 ThreadID:35 (ERROR) OracleExecutionStrategy.ExecuteAsync() : Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00904: "FALSE": ugyldig identifikator
https://docs.oracle.com/error-help/db/ora-00904/
I also have the same problem when using boolean in my entities.
This used to work:
builder.Property(e => e.Active).HasColumnName("ACTIVE").IsRequired().HasDefaultValue(0);
Now I have to add this:
builder.Property(e => e.Active).HasColumnName("ACTIVE").IsRequired().HasDefaultValue(0).HasColumnType("NUMBER");
Looks like everything that results in a boolean fails.
I looked for breaking changes, but could not find anything related to booleans.