Sfoglia il codice sorgente

fix required field detection

tags/2.0.1
Jonathan Cobb 4 anni fa
parent
commit
661578b96b
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +4
    -4
      wizard-common/src/main/java/org/cobbzilla/wizard/model/entityconfig/EntityConfig.java

+ 4
- 4
wizard-common/src/main/java/org/cobbzilla/wizard/model/entityconfig/EntityConfig.java Vedi File

@@ -555,10 +555,10 @@ public class EntityConfig {
HasValue hasValueAnnotation = accessor.getAnnotation(HasValue.class);
if (hasValueAnnotation != null) return true;
Column columnAnnotation = accessor.getAnnotation(Column.class);
if (columnAnnotation == null) return true;
if (columnAnnotation.nullable()) return false;
if (!empty(columnAnnotation.columnDefinition()) && columnAnnotation.columnDefinition().matches("\\s+NOT\\s+NULL\\s*")) {
return true;
if (columnAnnotation == null) return false;
if (!columnAnnotation.nullable()) return true;
if (!empty(columnAnnotation.columnDefinition())) {
return columnAnnotation.columnDefinition().matches("\\s+NOT\\s+NULL\\s*");
}
return false;
}


Caricamento…
Annulla
Salva