Skip to content
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

Change Collection to Iterable for event publishing #2927

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Sep 13, 2023

repository.saveAll(Window<?>) will be handled properly after this commit.

Fixes #2938

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 13, 2023
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 14, 2023
@mp911de
Copy link
Member

mp911de commented Sep 14, 2023

We deliberately chose to not consider Iterable types as domain types commonly implement Iterable or Streamable to hold inner values (Order implements Iterable<OrderPosition>). Therefore, we do not want to dive into such objects but consider events of the aggregate root.

@mp911de mp911de closed this Sep 14, 2023
@quaff
Copy link
Contributor Author

quaff commented Sep 15, 2023

We deliberately chose to not consider Iterable types as domain types commonly implement Iterable or Streamable to hold inner values (Order implements Iterable<OrderPosition>). Therefore, we do not want to dive into such objects but consider events of the aggregate root.

OK, it makes sense, and we should treat Window as Collection to fix this, I don't think any domain type will implements Window.

@mp911de
Copy link
Member

mp911de commented Sep 15, 2023

We have the same case with Page where the page type implements Iterable & Streamable.

@quaff
Copy link
Contributor Author

quaff commented Sep 15, 2023

We have the same case with Page where the page type implements Iterable & Streamable.

I've updated #2931 to include Page.

odrotbohm added a commit that referenced this pull request Sep 20, 2023
We now treat CrudRepository.saveAll(…) properly by unwrapping the given *Iterable*. This previously already worked for collections handed into the method but not for types only implementing Iterable directly (like Page or Window).

Fixes #3153.
Related tickets #2931, #2927.
odrotbohm added a commit that referenced this pull request Sep 20, 2023
We now treat CrudRepository.saveAll(…) properly by unwrapping the given *Iterable*. This previously already worked for collections handed into the method but not for types only implementing Iterable directly (like Page or Window).

Fixes #3153.
Related tickets #2931, #2927.
odrotbohm added a commit that referenced this pull request Sep 20, 2023
We now treat CrudRepository.saveAll(…) properly by unwrapping the given *Iterable*. This previously already worked for collections handed into the method but not for types only implementing Iterable directly (like Page or Window).

Fixes #3153.
Related tickets #2931, #2927.
odrotbohm added a commit that referenced this pull request Sep 20, 2023
We now treat CrudRepository.saveAll(…) properly by unwrapping the given *Iterable*. This previously already worked for collections handed into the method but not for types only implementing Iterable directly (like Page or Window).

Fixes #3153.
Related tickets #2931, #2927.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@DomainEvents method not being called on saveAll with Window<>
3 participants