Metadata dates remain null in the table

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Metadata dates remain null in the table

Postby bodnarescu.diana » Tue Jun 25, 2019 10:18 am

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
Diana Bodnarescu
Servoy Valued Professional
Freelance Servoy Developer
bodnarescu.diana
 
Posts: 25
Joined: Tue Mar 29, 2016 10:43 am

Re: Metadata dates remain null in the table

Postby jcompagner » Wed Jun 26, 2019 1:10 pm

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)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Metadata dates remain null in the table

Postby bodnarescu.diana » Thu Jun 27, 2019 8:58 am

Thank you, Johan.
Diana Bodnarescu
Servoy Valued Professional
Freelance Servoy Developer
bodnarescu.diana
 
Posts: 25
Joined: Tue Mar 29, 2016 10:43 am


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 9 guests

cron