Skip to content

feat: reject relation generation when same relation name and foreign key#11504

Open
aaqilniz wants to merge 1 commit intoloopbackio:masterfrom
aaqilniz:feat/handle-relation-name-error
Open

feat: reject relation generation when same relation name and foreign key#11504
aaqilniz wants to merge 1 commit intoloopbackio:masterfrom
aaqilniz:feat/handle-relation-name-error

Conversation

@aaqilniz
Copy link
Contributor

The relation generator generates relations when a foreign key name is the same as the relation name. But this fails while invoking the APIs.
This PR intercepts the relation generation and rejects it with an error when relation name is the same as the foreign key name.

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
@aaqilniz aaqilniz requested a review from nabdelgadir as a code owner March 19, 2026 09:29
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.

1 participant