I am learning how to use ORM with Postgres in Java and I want to maintain in the table column date record that will hold exactly the following format:
2022-05-28T21:12:01.000Z
So I see two path:
- Create a Postgres Insert trigger
- Just care about date insertint in dao logic
Second is pretty intuitive for me, but what should I choose? Maybe flyway migration may be of use here?
EDIT:: I've been said in the comment that Postgres saves date in binary format, so I'll handle this. But automatic insertion of 'date' is still unclear to me
Thanks in advance!