abp icon indicating copy to clipboard operation
abp copied to clipboard

Oracle Run -> Acme.BookStore.DbMigrator

Open s454637190 opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

该项目使用数据为Oracle时, 含有BOOLEAN类型字段 , Oracle 不支持 BOOLEAN类型字段,所以在运行时报错类型不存在

ea02d05e2d9702023daeb03a7706300b

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

s454637190 avatar Aug 01 '24 03:08 s454637190

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

maliming avatar Aug 01 '24 03:08 maliming

Here is my code, but it seem not work.

       Configure<AbpDbContextOptions>(options =>
       {
           options.UseOracle(opt =>
           {
               opt.UseOracleSQLCompatibility(OracleSQLCompatibility.DatabaseVersion19);
           });

       });

cocosip avatar Aug 12 '24 11:08 cocosip

Run xxxAbp.DbMigrator project fail !

db: oracle19c

image

hf-zhangyang avatar Aug 20 '24 08:08 hf-zhangyang

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.

stale[bot] avatar Apr 26 '25 05:04 stale[bot]