feat: Support value classes with compile-time metamodel adaptation#87
Merged
luanpotter merged 4 commits intomainfrom Jan 7, 2026
Merged
feat: Support value classes with compile-time metamodel adaptation#87luanpotter merged 4 commits intomainfrom
luanpotter merged 4 commits intomainfrom
Conversation
b12bc39 to
b6358b5
Compare
QuinnB73
approved these changes
Jan 2, 2026
Collaborator
QuinnB73
left a comment
There was a problem hiding this comment.
LGTM! Big fan of the functional interface to simplify the code gen
Nava2
requested changes
Jan 3, 2026
yawn-database-test/src/test/kotlin/com/faire/yawn/database/ValueClassTest.kt
Show resolved
Hide resolved
yawn-processor/src/main/kotlin/com/faire/yawn/generators/adapters/ValueClassAdapterGenerator.kt
Show resolved
Hide resolved
yawn-processor/src/main/kotlin/com/faire/yawn/generators/properties/ColumnDefGenerator.kt
Outdated
Show resolved
Hide resolved
|
Looks like the following requested reviewers are unavailable:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A spiritual successor to : #81 ; Fixes #79
Instead of using reflection, this solves the same problem at compile time by adding the capability of column defs defining a type adapter for querying. So far it is a functional interface with a single method, but could be expanded if we have more needs.
This should have negligible impact into any non-value class queries. It does mean we are "unwrapping" for value classes but we must do that to interop with Hibernate (there is no other possible way).