Skip to content

Conversation

@christophstrobl
Copy link
Member

The onEmpty attribute allows to define if an embedded entity should be set to null or an empty instance if all properties backing the entity are actually null.

@Embedded(onEmpty = USE_NULL) Address address;

@Embedded.Nullable & @Embedded.Empty offer shortcuts for onEmpty = USE_NULL and onEmpty = USE_EMPTY to reduce verbositility and simultaneously set JSR-305 @javax.annotation.Nonnull accordingly.

@Embedded.Nullable Address address;
The onEmpty attribute allows to define if an embedded entity should be set to null or a default instance if all properties backing the entity are actually null. @Embedded(onEmpty = USE_NULL) EmbeddedEntity embeddedEntity;
@Embedded.Nullable & @Embedded.Empty offer shortcuts for @Embedded(onEmpty = USE_NULL) and @Embedded(onEmpty = USE_EMPTY) to reduce verbositility and simultaneously set JSR-305 @javax.annotation.Nonnull accordingly. @Embedded.Nullable EmbeddedEntity embeddedEntity;
schauder pushed a commit that referenced this pull request May 22, 2019
The onEmpty attribute allows to define if an embedded entity should be set to null or a default instance if all properties backing the entity are actually null. @Embedded(onEmpty = USE_NULL) EmbeddedEntity embeddedEntity; Original pull request: #154.
schauder pushed a commit that referenced this pull request May 22, 2019
@Embedded.Nullable & @Embedded.Empty offer shortcuts for @Embedded(onEmpty = USE_NULL) and @Embedded(onEmpty = USE_EMPTY) to reduce verbositility and simultaneously set JSR-305 @javax.annotation.Nonnull accordingly. @Embedded.Nullable EmbeddedEntity embeddedEntity; Original pull request: #154.
schauder added a commit that referenced this pull request May 22, 2019
Clarified the effects of collections on nullable embedded entities. Original pull request: #154.
@schauder
Copy link
Contributor

That is polished and merged.
Thanks

@schauder schauder closed this May 22, 2019
@schauder schauder deleted the issue/DATAJDBC-374 branch June 18, 2019 09:09
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
mp911de added a commit that referenced this pull request Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants