Skip to content
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

refactor: Explicit typecast for policies after the deserialisation within IdPoliciesOnly projection #33018

Closed
wants to merge 3 commits into from

Conversation

abhvsn
Copy link
Contributor

@abhvsn abhvsn commented Apr 29, 2024

Description

De-serialising non-primitive datattypes from DB to object does not work as expected with JPA queries. This PR adds the custom getter method to typecast the jsonb column policies from base domain to Set<Policy> explicitly.

Slightly related article: https://nitin-karthy.medium.com/custom-type-conversions-in-spring-data-projections-48db914aaa39

@abhvsn abhvsn requested a review from sharat87 April 29, 2024 07:58
@abhvsn abhvsn changed the title refactor: Apply getter at field level refactor: Explicit typecast for policies after the deserialisation within IdPoliciesOnly projection Apr 29, 2024
@abhvsn
Copy link
Contributor Author

abhvsn commented May 2, 2024

Closing this as this is working for interface-based projection.
#32909

@abhvsn abhvsn closed this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant