Skip to content

Introduce PersistentProperty.isReadable #2915

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

Closed
mp911de opened this issue Aug 28, 2023 · 0 comments
Closed

Introduce PersistentProperty.isReadable #2915

mp911de opened this issue Aug 28, 2023 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Aug 28, 2023

Based on spring-projects/spring-data-mongodb#4485, we should introduce a isReadable flag for easier downstream usage of truly immutable properties. The immutable flag just expresses immutability on the instance but requires checks for withers and Kotlin copy methods for creating a new instance. That isn't handy for values of Kotlin data classes (properties of a Kotlin data class that cannot be set via copy).

@mp911de mp911de added the type: enhancement A general enhancement label Aug 28, 2023
@mp911de mp911de added this to the 3.2 M3 (2023.1.0) milestone Aug 28, 2023
@mp911de mp911de changed the title Use immutable flag for Kotlin data class properties that are values Introduce isReadable flag for Kotlin data class properties that are values Aug 28, 2023
@mp911de mp911de changed the title Introduce isReadable flag for Kotlin data class properties that are values Introduce PersistentProperty.isReadable for easier downstream usage Aug 28, 2023
@mp911de mp911de changed the title Introduce PersistentProperty.isReadable for easier downstream usage Introduce PersistentProperty.isReadable Aug 28, 2023
mp911de added a commit that referenced this issue Aug 28, 2023
isReadable reports whether a property can be read through PersistentPropertyAccessor, by either using property access through setters, a wither, Kotlin Copy method or by accessing the field directly.

Closes #2915
mp911de added a commit that referenced this issue Aug 28, 2023
Fix Javadoc references.

See #2915
@mp911de mp911de self-assigned this Aug 28, 2023
mp911de added a commit that referenced this issue Aug 28, 2023
isReadable reports whether a property can be read through PersistentPropertyAccessor, by either using property access through setters, a wither, Kotlin Copy method or by accessing the field directly.

Closes #2915
mp911de added a commit that referenced this issue Aug 28, 2023
Fix Javadoc references.

See #2915
mp911de added a commit that referenced this issue Aug 31, 2023
Fix Javadoc references.

See #2915
Original pull request: #2916
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant