8000 onDelete: 'RESTRICT' should be ignored to avoid ORA-00905: missing keyword · Issue #9189 · typeorm/typeorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
onDelete: 'RESTRICT' should be ignored to avoid ORA-00905: missing keyword #9189
Closed
@ertl

Description

@ertl

Issue Description

Expected Behavior

onDelete: 'RESTRICT' schould be ignored when a foreign key is generated for oracle since it is the default.

Actual Behavior

@ManyToOne('UserGroupSqlEntity', 'users', { eager: true, onDelete: 'RESTRICT', onUpdate: 'RESTRICT' })

produces this syntactically wrong alter statement

ALTER TABLE "user" ADD CONSTRAINT "FK_974590e8d8d4ceb64e30c38e051" FOREIGN KEY ("groupId") REFERENCES "usergroup" ("id") ON DELETE RESTRICT;

ORA-00905: missing keyword

My Environment

Dependency Version
Operating System windows10
Node.js version v16.15.1
Typescript version 4.6.3
TypeORM version 0.3.6

Additional Context

Relevant Database Driver(s)

DB Type Reproducible
aurora-mysql no
aurora-postgres no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql no
nativescript no
oracle yes
postgres no
react-native no
sap no
spanner no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✖️ Yes, I have the time, and I know how to start.
  • ✖️ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✅ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0