-
Notifications
You must be signed in to change notification settings - Fork 358
Introduce @InsertOnlyProperty. #1327
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
Conversation
Can we have that for R2DBC as well to keep both modules in sync when we build new features? |
For Spring Data JDBC you may now annotate properties of the aggregate root with `@InsertOnlyProperty`. Properties annotated in such way will be written to the database only during insert operations, but they will not be updated afterwards. Closes #637
You may now annotate properties of the aggregate root with `@InsertOnlyProperty`. Properties annotated in such way will be written to the database only during insert operations, but they will not be updated afterwards. Closes #637
3d200b3
to
93d1bc1
Compare
Added the R2DBC support. The second commit message is intended to work as the one commit message after squashing. |
6432168
to
93808d2
Compare
93808d2
to
3be9494
Compare
public Flux<T> all() { | ||
return delegate.all().concatMap(it -> maybeCallAfterConvert(it, tableName)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file got reformatted using spaces. Mind checking your formatter settings and reformat that one to avoid merge conflicts?
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE }) | ||
@Documented | ||
public @interface InsertOnlyProperty { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments. Please also squash the actual changes into one commit.
Fixed, squashed and merged. |
May be its too late write any suggestion. But let me write my idea about it. What if will be added property ChangeConditionProperty which get array of strings such as "INSERT", "UPDATE". And then from this condition attribute may be included or excluded from an update script. Thanks! |
For Spring Data JDBC you may now annotate properties of the aggregate root with
@InsertOnlyProperty
.Properties annotated in such way will be written to the database only during insert operations, but they will not be updated afterwards.
Closes #637