Skip to content
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

fix: EXPOSED-137 SET DEFAULT reference option should not be supported in Oracle #1830

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

bog-walk
Copy link
Member

@bog-walk bog-walk commented Aug 9, 2023

The following test fails when run on Oracle:

sqlite/ForeignKeyConstraintTests/'test ON DELETE SET DEFAULT for databases that support it without SQLite'()

Fails with:

java.sql.SQLException: ORA-03001: unimplemented feature.
Statement(s):
CREATE TABLE ITEM (ID NUMBER(12) PRIMARY KEY, "NAME" VARCHAR2(20 CHAR) NOT NULL, CATEGORYID NUMBER(12) DEFAULT 0 NOT NULL,
CONSTRAINT FK_ITEM_CATEGORYID__ID FOREIGN KEY (CATEGORYID) REFERENCES CATEGORY(ID) ON DELETE SET DEFAULT)

Oracle's ON DELETE clause only supports CASCADE or SET NULL reference options (documentation).

A warning is now logged instead of appending to the query string and Oracle is excluded from relevant tests.

The following test fails when run on Oracle:

sqlite/ForeignKeyConstraintTests/'test ON DELETE SET DEFAULT for databases that support it without SQLite'()

Fails with:
java.sql.SQLException: ORA-03001: unimplemented feature

Oracle's ON DELETE clause only supports CASCADE or SET NULL reference options.

A warning is now logged and the option is not appended to the query string.
@bog-walk bog-walk requested review from e5l and joc-a August 9, 2023 19:38
@bog-walk bog-walk merged commit 1fda79f into main Aug 10, 2023
3 checks passed
@bog-walk bog-walk deleted the bog-walk/exclude-oracle-set-default branch August 10, 2023 13:59
saral pushed a commit to saral/Exposed that referenced this pull request Oct 3, 2023
…JetBrains#1830)

The following test fails when run on Oracle:

sqlite/ForeignKeyConstraintTests/'test ON DELETE SET DEFAULT for databases that support it without SQLite'()

Fails with:
java.sql.SQLException: ORA-03001: unimplemented feature

Oracle's ON DELETE clause only supports CASCADE or SET NULL reference options.

A warning is now logged and the option is not appended to the query string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants