Skip to content
New issue

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

Edges have blank links #84

Open
nkibler7 opened this issue Apr 18, 2015 · 0 comments
Open

Edges have blank links #84

nkibler7 opened this issue Apr 18, 2015 · 0 comments
Labels

Comments

@nkibler7
Copy link

I noticed that sails-orientdb seems to put two links on the edge's schema that aren't necessary (since in a graph DB, we have out/in). These links aren't actually populated from what I can tell, so why are they needed at all?

Here's an example of my User schema. Note that the following/followers relationship is on the User class itself, and I confirmed that the placement of the dominant flag is correct because the edge direction makes sense when I do something like user.followers.add().

var User = {
  // Enforce model schema
  schema: true,
  // Change long table names to edge names
  joinTableNames: {
    following: 'follows'
  },

  attributes: {
    // Field attributes
    email: {
      type: 'email',
      unique: true
    },
    firstName: 'string',
    lastName: 'string',
    deleteOn: 'date',

    // Association attributes
    followers: {
      collection: 'User',
      via: 'following'
    },
    following: {
      collection: 'User',
      via: 'followers',
      dominant: true
    }

  }
};

When I view the edge in OrientDB's web interface, I see this:

orientdb-edge-question

@dmarcelino dmarcelino added the bug label Apr 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants