enable nullable propeties without a macro
This commit is contained in:
parent
ccdfaa8ae9
commit
dca7e7d791
|
@ -555,11 +555,7 @@ InvalidNullabilityException::InvalidNullabilityException(std::string const& obje
|
|||
m_what = "'Object' property '" + property.name + "' must be nullable.";
|
||||
}
|
||||
else {
|
||||
#if REALM_NULL_STRINGS == 1
|
||||
m_what = "Array or Mixed property '" + property.name + "' cannot be nullable";
|
||||
#else
|
||||
m_what = "Only 'Object' property types are nullable";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,11 +71,7 @@ void Schema::validate() const
|
|||
|
||||
// check nullablity
|
||||
if (prop.is_nullable) {
|
||||
#if REALM_NULL_STRINGS == 1
|
||||
if (prop.type == PropertyTypeArray || prop.type == PropertyTypeAny) {
|
||||
#else
|
||||
if (prop.type != PropertyTypeObject) {
|
||||
#endif
|
||||
exceptions.emplace_back(InvalidNullabilityException(object.name, prop));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue