Default 'null' value is not applied to a field with type ["null", "object"]
See original GitHub issuePrerequisites
- I have read the documentation;
- In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I’m providing a shared playground link demonstrating the issue.
Description
Default ‘null’ value is not applied to a field with type [“null”, “object”]
Steps to Reproduce
GIVEN: a property of type ["null", "object"]
AND default value is null
AND ui:emptyValue = null
See shared playground link
Expected behavior
default value is null
Actual behavior
default value is an empty object {}
both default
and ui:emptyValue
values are ignored for an object property.
Version
Version of the playground. I guess, current latest stable
Note:
It works fine for ["null", "string"]
and ["null", "number"]
types.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
java - Error setting a default null value for an annotation's field
As others have said, there is a rule which says that null is not a valid default value in Java.
Read more >Null Value Support - Apache Pinot Docs
By default, Pinot transforms null values coming from the data source to a default value determined by the type of the corresponding column...
Read more >Null In Java: Understanding the Basics - Upwork
Null serves as the default value of any uninitialized reference variable, including instance variables and static variables (although you will ...
Read more >MySQL 8.0 Reference Manual :: 11.6 Data Type Default Values
SERIAL DEFAULT VALUE is a special case. In the definition of an integer column, it is an alias for NOT NULL AUTO_INCREMENT UNIQUE...
Read more >Null and undefined (Reference) - Prisma
How Prisma Client handles null and undefined, including a GraphQL use case. ... Setting a field value to undefined is the same as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates on this ?
Another year, no one actually willing to contribute a PR to fix it. Is anyone willing to take the time to do so? 😉