Closed purplemana closed 6 years ago
Hey @purplemana ,
I was able to get this done by doing the following:
instance.with({
Team: Team,
['Affiliation:Division']: Affiliation.division,
['Affiliation:Conference']: Affiliation.conference,
})
instance.create('Affiliation:Conference', spec(conference))
This created a node with labels :Affiliation
& :Conference
Thanks @hellopat! I was gonna close this, went through the code to find it out, but my approach is different. I wish there was a way for the generic with
methods approach to also take care of extensions, but I guess I can live with this.
How I did this -
instance.model(Models.User, UserSchema);
// Now extend User to EmailUser
instance.extend(Models.User, Models.EmailUser, EmailUserSchema);
Closing this issue.
Hi,
After searching and comparing a lot of ORM/OGM wrappers around Neo4j, I came across this and it looks fantastic, just the right bunch of APIs and very close to the Neo4J concepts.
I am working on a project where for authentication, I need to support users from various authentication modes, e.g. Email/Password, Ldap, Oauth etc. For this, I have decided to use labels to identify the type, e.g.
:User:Email
,:User:Ldap
,:User:OAuth
etc. Looking at the code I can see that it is possible to set labels as an array on the Model. Maybe I missed this in the documentation.Could you please point me to some examples related to defining a Schema which associates with multiple users? I see that schemas extend, and my user graph should be ideally extendible, e.g.
What would be the best way to model this using Neode?
Thanks!