Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tags: maxifridge/mapstruct

Tags

1.7.0-SNAPSHOT-retainAll.1

Toggle 1.7.0-SNAPSHOT-retainAll.1's commit message
Use retainAll() for Set and Map instead of clear()

This limits side effects of removing preemptively all elements through clear() to non-Set Collections and Arrays.

A good example of why it is important is : when mapping to a Set property of a Hibernate-managed entity, calling clear() then addAll() effectively triggers requests for all deletions then all additions ; though because of the order of execution in Hiberante, only new elements are inserted.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.