Skip to content

Commit

Permalink
Merge pull request #24186 from mshima/skip_ci-user-backreference
Browse files Browse the repository at this point in the history
add user back reference error
  • Loading branch information
DanielFran authored Nov 10, 2023
2 parents 267b233 + bc4191c commit f4750cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generators/base-application/support/prepare-relationship.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export default function prepareRelationship(entityWithConfig, relationship, gene
entityWithConfig.databaseType !== DATABASE_NO &&
(relationship.relationshipType === 'one-to-many' || relationship.ownerSide === false)
) {
if (otherEntityData.builtInUser) {
throw new Error(`Error at entity ${entityName}: relationships with built-in User cannot have back reference`);
}
throw new Error(
`Error at entity ${entityName}: could not find the other side of the relationship ${stringifyApplicationData(relationship)}`,
);
Expand Down

0 comments on commit f4750cf

Please sign in to comment.