-
Notifications
You must be signed in to change notification settings - Fork 600
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
PetaPoco. Providers: When using Oracle, calling FetchAsync will throw exception #691
Comments
@jackzhang520 is there a specific test that fails from this? I'm currently updating the docker configuration for the test projects, and can look into this once that's done. |
@Ste1io To solve this problem, it is necessary to modify PetaPoco.Providers.OracleDatabaseProvider like this: |
Testing anything for Oracle will have to wait until I complete #697 and merge it into the Development branch. It looks like you have already found a fix for this issue, based on your screenshots. Could you open a PR with your changes, so we have something ready once Oracle tests are added? |
@Ste1io see https://www.databasestar.com/dual-table-in-oracle/ |
PetaPoco. Providers: When using Oracle, calling FetchAsync will thow exception
SQL will start with "SELECT * FROM (SELECT ROW-NUMBER() OVER (ORDER BY (SELECT NULL)) peta_ Rn", but in ORACLE, "SELECT NULL" will prompt ORA-00923: The required FROM keyword was not found. After reading PetaPoco's source code, the BuildPageQuery of OracleDatabaseProvider will be redirected to the BuildPageQuery of SqlServerDatabaseProvider, causing this issue.
Change "SELECT NULL" to " SELECT NULL from DUAL" can fix this issue
The text was updated successfully, but these errors were encountered: