Skip to content

Added entity validation#380

Open
folkef6 wants to merge 2 commits intomainfrom
GG-402-validate-entities
Open

Added entity validation#380
folkef6 wants to merge 2 commits intomainfrom
GG-402-validate-entities

Conversation

@folkef6
Copy link
Collaborator

@folkef6 folkef6 commented Feb 26, 2026

No description provided.

Comment on lines +1846 to +1852
var size = entityType.getEntityKeys().keys().stream()
.flatMap(key -> key.getKeys().stream())
.toList()
.size();

if (size > 22)
addErrorMessage("Total amount of key columns in type %s can't be greater than 22.", entityType.getName());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foreslår å vente med å merge denne inntil #379 blir merget. Akkurat denne delen er jo som sagt basert på at #379 ender opp med å bruke RecordX.valueN()

Comment on lines +67 to +71
@DisplayName("Total amount of keys exceeds 22 across multiple @key directives")
void tooManyKeysSplit() {
assertErrorsContain("tooManyKeysSplit",
"Total amount of key columns in type Customer can't be greater than 22.");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Litt kjedelig at vi ender opp med denne valideringen, og derfor vil jeg gjøre et lite forsøk på å fjerne problemet i stedet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja, vi kan ju gott fjerne dette om du löser problemet.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #390

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