Skip to content

MappingContext should not consider java.util.Optional an entity type #2390

Closed
@christophstrobl

Description

@christophstrobl

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:

  • Introduce nullable wrapper check to TypeInformation.
  • Return the component type of the wrapper for TypeInformation#getActualType.
  • Use the nullable component type when adding persistent entities for a property.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions