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

Type Map is not supported #23

Open
fabienfleureau opened this issue Oct 20, 2023 · 2 comments
Open

Type Map is not supported #23

fabienfleureau opened this issue Oct 20, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@fabienfleureau
Copy link

Describe the bug
There is an error for entity that contains field of type Map.

Is the bug at startup before you perform any action?
Not applicable

@entity code

    @Type(value = io.hypersistence.utils.hibernate.type.json.JsonType::class)
    @Column(name = "cost_details", updatable = false, nullable = false, columnDefinition = "jsonb")
    val map: Map<AnyEnumTypeOrString, String>,
@aileftech
Copy link
Owner

This one is a bit more complicated than a standard field because we don't currently support the @Type annotation. I will look into this as well but it's going to take a bit more time :)

@aileftech aileftech self-assigned this Oct 21, 2023
@aileftech aileftech added the enhancement New feature or request label Oct 21, 2023
@aileftech
Copy link
Owner

I've looked into this because I ended up using json fields in one of my projects.

The current behaviour is that these columns are not shown when looking at the table. If you SELECT * from the SQL console though, they appear in their JSON representation as text.

Since the @Type annotation can be used not just with Map but with any object, I can't introduce a specific support for Map. So I'll look into supporting this as if they are just "text" fields with the JSON value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants