Skip to content

Dedicated exception for aggregate roots without id #1855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

schauder
Copy link
Contributor

Dedicated exception for aggregate roots without id.

We now distinguish between an id not set during insert and a supposed aggregate root without id property.

Closes #1502
Superceds #1843

We now distinguish between an id not set during insert and a supposed aggregate root without id property.

Closes #1502
@schauder schauder requested a review from mp911de August 13, 2024 09:01
@mp911de mp911de changed the title Issue/1502 no id exception Dedicated exception for aggregate roots without id Aug 13, 2024
@mp911de
Copy link
Member

mp911de commented Aug 13, 2024

Regarding commit messages, it would be good to be more explicit. The current messages leaves some ambiguity whether the identifier value is not set or whether a property is missing.

schauder added a commit that referenced this pull request Aug 14, 2024
Formatting and removing public modifier from test methods.

See #1502
Original pull request #1855
schauder added a commit that referenced this pull request Aug 14, 2024
We now distinguish between an id not set during insert and a supposed aggregate root without id property.

Closes #1502
Original pull request #1855
@schauder
Copy link
Contributor Author

Thanks for the feedback. I applied it and merged into main.

@schauder schauder closed this Aug 14, 2024
@schauder schauder added this to the 3.4 M1 (2024.1.0) milestone Aug 14, 2024
@schauder schauder deleted the issue/1502-no-id-exception branch August 14, 2024 11:25
@mp911de mp911de added the type: enhancement A general enhancement label Aug 14, 2024
schauder added a commit that referenced this pull request Aug 14, 2024
Formatting and removing public modifier from test methods.

See #1502
Original pull request #1855
schauder added a commit that referenced this pull request Aug 14, 2024
We now distinguish between an id not set during insert and a supposed aggregate root without id property.

Closes #1502
Original pull request #1855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When an aggregate root has no id we should throw an appropriate exception
2 participants