You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but when I try to access those properties individually with a dot operator, it outputs undefined!!
console.log(user.hash); // => undefined
What could be causing this?
This only happens with the properties that aren't declared in the schema. If I declare hash in the schema it works. Is this by design? (that you can't access schema-less properties) And even if so, how is it even achieved - not allowing access properties with dot operator?
The text was updated successfully, but these errors were encountered:
I have a mongoose schema less schema
and any object I save with it, seems to contain the properties that I saved
but when I try to access those properties individually with a dot operator, it outputs undefined!!
What could be causing this?
This only happens with the properties that aren't declared in the schema. If I declare
hash
in the schema it works. Is this by design? (that you can't access schema-less properties) And even if so, how is it even achieved - not allowing access properties with dot operator?The text was updated successfully, but these errors were encountered: