Closed Ansis100 closed 10 months ago
Thanks for reporting it. There was a bug with the code which created the relationship properties object. It should be fixed at neogma version v1.13.0 that was just published. Please let me know if your issue is resolved.
As a side effect, the behavior of required
changed - as now it's the correct one. In the past it would crash when "required" wasn't defined at the schema, however now it doesn't. To avoid surprises, I've made the required
schema property non-optional, so it has to be explicitly defined.
When calling
relateTo
(either the static, or the instance method) without specifying the relationship properties, it will crash with the following error:However, creating an object and a relationship in the same
createOne
call will not have that error. The relationship property can be specified, but it's not required.