aileftech / snap-admin

A plug-and-play, auto-generated CRUD database admin panel for Spring Boot apps
MIT License
251 stars 18 forks source link

Type `Instant` is not supported #21

Closed fabienfleureau closed 10 months ago

fabienfleureau commented 10 months ago

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

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

    @Column(name = "created_at", nullable = false, updatable = false)
    @CreatedDate
    var createdAt: Instant

    @Column(name = "updated_at", nullable = false)
    @LastModifiedDate
    var updatedAt: Instant
aileftech commented 10 months ago

Hi again!

I can add support for Instant soon. I just wanted to ask you if for this and the other unsupported field types you get an actual crash or (expected behaviour) the exclamation mark warning on the table and everything else keeps working fine.

fabienfleureau commented 10 months ago

Hello, It is the current expected behavior with the exclamation mark.

aileftech commented 10 months ago

I have a pushed a commit to dev which should fix this. As specified in the message, the code assumes that all Instant objects are to be instantiated with UTC timezone (cannot do otherwise).

aileftech commented 10 months ago

Released in 0.1.8.