This commit is contained in:
Adria Navarro 2024-05-03 19:50:04 +02:00
parent 823b5bdb7a
commit a86d23584e
1 changed files with 5 additions and 4 deletions

View File

@ -17,12 +17,13 @@
let relationshipType let relationshipType
$: { $: {
if (type === FieldType.BB_REFERENCE_SINGLE) { if (
type === FieldType.BB_REFERENCE_SINGLE ||
constraints?.type !== "array" // Handle deprecated "single" user references
) {
relationshipType = RelationshipType.ONE_TO_MANY relationshipType = RelationshipType.ONE_TO_MANY
} else if (constraints?.type === "array") {
relationshipType = RelationshipType.MANY_TO_MANY
} else { } else {
relationshipType = RelationshipType.ONE_TO_MANY relationshipType = RelationshipType.MANY_TO_MANY
} }
} }