Page 1 of 1

Metadata dates remain null in the table

PostPosted: Tue Jun 25, 2019 10:18 am
by bodnarescu.diana
Hello,

I have started to work with metadata tables, in Servoy developer 2019.3.1.3413.
I would expect that the modification_date is updated for a record that has changes, but i see it is not, when i query that table. It is null. Same goes for deletion_date, I also don't see it updated when i delete a record and query the table.
I do see my changes in git after i update metadata (database to workspace), so that is working ok.
But should't modification_date/deletion_date be updated?

Thank you,
Diana

Re: Metadata dates remain null in the table

PostPosted: Wed Jun 26, 2019 1:10 pm
by jcompagner
when creating meta data table and then the modification_date colum we should have added a auto enter system value of "modification datetime" (you can make a case for that that we auto configure it that way when you press the button "add metadata date columns"

if you configure that manually for that column then servoy will fill that in on any modification. Else you need to do that your self (assign a new Date() to that dataprovider)

For deletion: what can we fill in if you just delete the record?
For metadata tables you should not call delete but set the a new Date() on the "deletion_date" column. So that the system knows (and can sync up to other developers or staging/production) that this record can be deleted.
So when you query in the developer for records you have to make sure that you do "deletion_date is null" in your queries.
(so you filter out deleted records)

Re: Metadata dates remain null in the table

PostPosted: Thu Jun 27, 2019 8:58 am
by bodnarescu.diana
Thank you, Johan.