Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Set default to NULL on copy if nullIfEmpty is set #8365

Closed
wants to merge 1 commit into from

Conversation

aschempp
Copy link
Member

I have a date field in my DCA which can be NULL and doNotCopy enabled. If the record is duplicated, the value currently results in 01.01.1970.

@leofeyer
Copy link
Member

Shouldn't we use Widget::getEmptyValue() here?

@leofeyer leofeyer added this to the 3.5.13 milestone Jun 14, 2016
@aschempp
Copy link
Member Author

I thought about that too, but that means an integer field would get '0' as default, which is probably not what you want?

@leofeyer
Copy link
Member

0 seems correct for an INT field IMHO.

@aschempp
Copy link
Member Author

But its very likely not what you want in a field, because you want to enter a new value.

What happens if a new record is created? Are we using 0 or empty?

@leofeyer
Copy link
Member

We are using Widget::getEmptyValue() 😄

@leofeyer
Copy link
Member

Fixed in aff8643.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants