I am trying to create a "CreatedOn" field. I succesfully added a constraint in my database that will fill the field with the current datetime when I insert a record.
Now I want to show this as a UIOMaticListViewField using the following code:
[UIOMaticListViewField(Name = "Aangemaakt")]
public DateTime CreatedOn { get; set; }
This works perfect, but now when I insert a new item using Umbraco it also inserts a CreatedOn which is NULL, so it dont fill with the current datetime (constraint in database).
I tryed to add a [Ignore] annotation but this didn't work. It does not load the data from the database but it works when I insert a new record to the database using Umbraco.
CreatedOn
Hi,
I am trying to create a "CreatedOn" field. I succesfully added a constraint in my database that will fill the field with the current datetime when I insert a record.
Now I want to show this as a UIOMaticListViewField using the following code:
This works perfect, but now when I insert a new item using Umbraco it also inserts a CreatedOn which is NULL, so it dont fill with the current datetime (constraint in database).
I tryed to add a [Ignore] annotation but this didn't work. It does not load the data from the database but it works when I insert a new record to the database using Umbraco.
Do you guys have any idea how to fix this?
Kind regards,
Yanick
Hmm sounds like you might have found a bug, as a workaround you could populate that field from code, so using the event model just before it inserts
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.