snap-admin
snap-admin copied to clipboard
Type `Map` is not supported
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>,
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 :)
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.