Oracle Run -> Acme.BookStore.DbMigrator
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
该项目使用数据为Oracle时, 含有BOOLEAN类型字段 , Oracle 不支持 BOOLEAN类型字段,所以在运行时报错类型不存在
Reproduction Steps
No response
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
8.0
User Interface
Blazor
Database Provider
EF Core (Default)
Tiered or separate authentication server
None (Default)
Operation System
Windows (Default)
Other information
No response
The Oracle EF Core 23 provider will take the value set for OracleSQLCompatibility to know what DB version's SQL it should generate. By default, it will assume version 23 since it's ODP.NET 23. Oracle DB 23ai supports Boolean table columns. If you are using DB 19c, then you have to set OracleSQLCompatibility to 19 to tell ODP.NET to use numeric values instead of Booleans.
See
https://github.com/oracle/dotnet-db-samples/issues/380#issuecomment-2112766112
https://github.com/oracle/dotnet-db-samples/issues/377#issuecomment-2096419703
https://docs.oracle.com/en/database/oracle/oracle-database/21/odpnt/EFCoreAPI.html#GUID-41786CF0-11E3-4AD2-8ED1-3D31D5FE2082
Here is my code, but it seem not work.
Configure<AbpDbContextOptions>(options =>
{
options.UseOracle(opt =>
{
opt.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
});
});
Run xxxAbp.DbMigrator project fail !
db: oracle19c
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.