Open exoup opened 11 months ago
Hey there,
I'm afraid you can't provide default values for relationships, only for the node itself. I'm noting this, it's a useful feature 👍
Hi, sorry, maybe nothing changed :D about default attribute of relationship properties schema.
So, if relationship props are defined by the same Ischema
properties: {
someProp: {
property: 'someProp',
schema: {
type: 'string'
default: 'me' // by interface ISchema
it just doesn't work out.
Thanks,
@marisb11 Hey there, I'm afraid that nothing has changed 😓 The default
property comes from the validation package (called revalidator
), which is a bit outdated and not very easy to adjust. So basically, that property is pretty much useless and should be ignored (both for the model and relationships).
I have a User model with a relationships property that looks like this:
Is there a way to give these a default value or a beforeCreate hook? When I go to create a user node and associate it with a Survey node, I get a Neo4j error about missing feedback and complete parameters.
I've tried adding a
default
value but it does not work.I was creating my user node like this: