-
Notifications
You must be signed in to change notification settings - Fork 682
MappingContext should not consider java.util.Optional an entity type #2390
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
Milestone
Comments
christophstrobl
added a commit
to spring-projects/spring-data-mongodb
that referenced
this issue
Jun 23, 2021
christophstrobl
added a commit
to spring-projects/spring-data-mongodb
that referenced
this issue
Jun 25, 2021
odrotbohm
added a commit
that referenced
this issue
Jul 9, 2021
Unified the calculations made for entityTypeInformation and entityTypes in AbstractPersistentProperty. This avoids both calculations getting out of sync. Also we avoid premature calculation abortions if SimpleTypeHolder.isSimpleType(…) returns true for the raw property type. The latter has caused issues for collection properties in Spring Data KeyValue which considers everything in java.util a simple type. Related ticket: #2390.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While this has been fine for quite a while the tightened access restrictions as of Java16 cause trouble when trying to open the protected constructor via reflection.
Further more considering a nullable wrapper type, like
Optional
, a persistent entity is problematic, cause it is the actual type argument that should be taken into account.Things to do:
TypeInformation
.TypeInformation#getActualType
.The text was updated successfully, but these errors were encountered: