mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
enable nullable propeties without a macro
This commit is contained in:
parent
fc631c3e6f
commit
e3fb40f299
@ -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…
x
Reference in New Issue
Block a user