-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: Support for readonly on jakarta persistence #27084
base: main
Are you sure you want to change the base?
WIP: Support for readonly on jakarta persistence #27084
Conversation
952f4bf
to
e9e006f
Compare
6c2ea84
to
e905b85
Compare
Seems like the "IT" tests are not failing, even though they may should in the current state. I have debugged a sample application using this change and seems like when passing a value in a non-updateable field, the save/saveAndFlush JPA Repository method still returns the set value, even though it is not what is in the (MySQL) database in the end. I do wonder, how I can actually write a test for this kind of behaviour. Anyone having an idea, maybe @mshima ? Or do you think, we can leave this "sort of" untested this way? According to spring-projects/spring-data-jpa#1735, this is expected behaviour. |
and to more easily extend jakarta persistence configuration in Column
e905b85
to
4aacc7c
Compare
By the way, for some reasons, it complains about some Sonar findings - but the only thing I changed there was to extend one test entity. I do wonder, if I need to/should do something about it in this Pull request |
New entities added new code and increased complexity, the sonar error is not blocking. |
Ok, and any hints regarding testability of these added attributes, if anything that happens in our own generated code won't notice any change due to Spring Data JPA's behaviour? |
@OmarHawk readonly is quite uncommon use case. Not sure it’s possible to test a pure |
Add readonly to typescript type? |
I guess, I may finish this in around 4 weeks - heading off to some vacation. :-) I think, the very first commit here would already be "worth" integrating, as it does only refactor the template logic for the |
Contains changes to more easily extend jakarta persistence configuration in
@Column
definition#27048
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.