-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect '0' as a default when generating DAOs #12483
Conversation
(Standard links)
|
I like the direction of this PR. I just want to ask about the confidence that this is actually NFC. I take it you are surfacing into the DAO what will happen via MySQL table definition if DAO provide no value for these fields. |
@JoeMurray assuming the tests pass, I think this is harmless, as it just helps the PHP |
Test failure looks unrelated. But just to be sure let's have @civicrm-builder retest this please. |
Test fail still appears to be unrelated. @civicrm-builder retest this please. |
My initial reaction was the same as @JoeMurray -- liking the direction but feeling some trepidation about how to demonstrate the safety ( (1) Joe asked if this was "... surfacing into the DAO what will happen via MySQL table definition...". This appears to be accurate -- it fits with the logic of the main change (in (2) There's a few references in (3) There are a bunch of (4) There's surprisingly little reference to (5) (6) As far as I can see, (7) I'm going to add the |
@civicrm-builder retest this please |
This turned out to have an impact on Example
And everything else is the same. In other words, default values are better represented in the test object. |
We're down to 1 failing test and it is a preexisting failure not related to this PR: |
I've mulled. Now I'm merging |
Overview
When generating the DAO files, set the default even if it is "0"
Before
DAO fields were missing default of '0'
After
DAO fields contain this default
Notes
The Api v4 uses this default value to determine if a field is required for api input. In addition to this PR I've fixed the logic there: civicrm/org.civicrm.api4@377f8f6