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

Document how to use JPA converters on @Id #6

Open
manosbatsis opened this issue Oct 10, 2022 · 0 comments
Open

Document how to use JPA converters on @Id #6

manosbatsis opened this issue Oct 10, 2022 · 0 comments
Assignees

Comments

@manosbatsis
Copy link
Owner

manosbatsis commented Oct 10, 2022

@Embeddable
class MyObjectId {
    @Column(name = "ID", nullable = false)
    @Convert(converter = MyObjectConverter::class)
    private var id: MyObject? = null
}

@EmbeddedId
private var pk: MyObjectId? = null

See https://stackoverflow.com/questions/42929194/how-to-create-attribute-converter-for-id/48921953#48921953

Also a test with e.g. Uuid would be nice

@manosbatsis manosbatsis self-assigned this Oct 10, 2022
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

No branches or pull requests

1 participant