We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have
instance .with({ WorkBase: require('./models/WorkBase'), }); instance.extend('WorkBase', 'OrgUnit', require('./models/OrgUnit'));
with WorkBase.ts:
module.exports = { id: { type: 'uuid', primary: true }, name: { type: 'string', indexed: true, required: true }}
and OrgUnit.ts:
module.exports = { // EXTENDS: WorkBase owns: { // orgunit belongs to this orgunit type: 'relationship', relationship: 'owns', direction: 'out', target: 'OrgUnit', properties: { since: 'number', }, }, participate: { // orgunit participates in this orgunit type: 'relationship', relationship: 'participate', direction: 'out', target: 'OrgUnit', properties: { since: 'number', }, }}
Why do I get the error on: Neode.model('OrgUnit').create({id:1, name:'xyz'}).then()
Neode.model('OrgUnit').create({id:1, name:'xyz'}).then()
The text was updated successfully, but these errors were encountered:
Which version are you using?
I've noticed that you've got id set as a uuid but you've passed through a number. It shouldn't be an issue but it's worth checking.
Sorry, something went wrong.
I am using the NPM which is 0.1.16 . The "id issue" just happend as i reduced my code for the issue text. I will update now to the new NPM
After a quick test, it looks like you need to use export default out of the box with typescript rather than module.exports.
export default
module.exports
Thank you! It works!
No branches or pull requests
I have
with WorkBase.ts:
and OrgUnit.ts:
Why do I get the error on:
Neode.model('OrgUnit').create({id:1, name:'xyz'}).then()
The text was updated successfully, but these errors were encountered: