What happened. A Customer entity had a required flag:
@NotNull
@Column(name = "SUBSCRIBED", nullable = false)
private Boolean subscribed = Boolean.FALSE;
jmix-create-entity prescribes @NotNull for a required field, and the component table
in jmix-create-detail-view maps Boolean to checkbox. Following both, the detail view
gets a checkbox bound to a mandatory attribute — and Jmix marks such a field required from
metadata. For a Vaadin Checkbox the empty value is false, so an unchecked required
checkbox is invalid: the save action silently does nothing and the view stays open. The
entity can never be created with the flag false.
How it surfaced. Only in a @UiTest that clicked save and then failed to find the
record. Nothing was logged: no exception, no validation message in the test output. Both
compileJava and a green clean test (before the UI test existed) passed. Diagnosing it
took a purpose-written probe over HasValidation.isInvalid() on every form field.
The fix is one attribute, and it is not mentioned in either skill:
<checkbox id="subscribedField" property="subscribed" required="false"/>
Why it matters. Two skills, each correct alone, compose into a defect. A required
boolean is an ordinary domain concept ("active", "public", "applies to orders"), the
default value is usually false, and the failure mode is silence rather than an error.
The same latent bug sat in a second detail view in this project and would have shipped,
because no test had ever unchecked that box.
Suggested fix. In jmix-create-detail-view, add a line to the Field Component Mapping
table or the Final XML Type Audit: a checkbox bound to a @NotNull Boolean must declare
required="false", since Vaadin treats unchecked as empty. Optionally note it in
jmix-create-entity next to the required-field defaults.
Found while building a real Jmix 2.8 application (document registry, Vaadin UI, PostgreSQL, deployed behind nginx).
What happened. A
Customerentity had a required flag:jmix-create-entityprescribes@NotNullfor a required field, and the component tablein
jmix-create-detail-viewmapsBooleantocheckbox. Following both, the detail viewgets a checkbox bound to a mandatory attribute — and Jmix marks such a field required from
metadata. For a Vaadin
Checkboxthe empty value isfalse, so an unchecked requiredcheckbox is invalid: the save action silently does nothing and the view stays open. The
entity can never be created with the flag false.
How it surfaced. Only in a
@UiTestthat clicked save and then failed to find therecord. Nothing was logged: no exception, no validation message in the test output. Both
compileJavaand a greenclean test(before the UI test existed) passed. Diagnosing ittook a purpose-written probe over
HasValidation.isInvalid()on every form field.The fix is one attribute, and it is not mentioned in either skill:
Why it matters. Two skills, each correct alone, compose into a defect. A required
boolean is an ordinary domain concept ("active", "public", "applies to orders"), the
default value is usually
false, and the failure mode is silence rather than an error.The same latent bug sat in a second detail view in this project and would have shipped,
because no test had ever unchecked that box.
Suggested fix. In
jmix-create-detail-view, add a line to the Field Component Mappingtable or the Final XML Type Audit: a
checkboxbound to a@NotNullBoolean must declarerequired="false", since Vaadin treats unchecked as empty. Optionally note it injmix-create-entitynext to the required-field defaults.Found while building a real Jmix 2.8 application (document registry, Vaadin UI, PostgreSQL, deployed behind nginx).