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

[falcor] world -> character, and character -> world #31

Open
joshdmiller opened this issue Sep 17, 2016 · 0 comments
Open

[falcor] world -> character, and character -> world #31

joshdmiller opened this issue Sep 17, 2016 · 0 comments

Comments

@joshdmiller
Copy link

joshdmiller commented Sep 17, 2016

Overview

Migrate falcor routes pertaining to characters to get the database relationships using Neo4j.

Specs

The details of characters still come from MongoDB. It is only their association to worlds (and other entities, in other GH issues) that is stored in Neo4j. The _id property in neo will be the same as the _id property in MongoDB.

Character Length

The current length of characters comes from the length of the array in the mongo document. Instead, this should come from the set of non-archived characters (see #12 and #11) that have the HAS relationship from the world in question, ordered by their creation date.

Characters By Index

The current means of fetching individual characters is by their index position in the array. This array should become the ordered set of character relationships that follow the above logic.

Push Character

Characters are created by pushing to the array in mongo. Instead, once the character itself is stored in mongo, the relationship should be added to neo:

(:World)-[:HAS {HasProps}]->(:Character {CharacterProps})

With the following properties:

type HasProps = {
  created_at: timestamp,
  creator: string, // id of currently-authenticated user
};

type CharacterProps = {
  _id: string,
  created_at: timestamp,
  creator: string, // id of currently-authenticated user
};

Delete Character

Characters are currently deleted by removing the document in Mongo and deleting it from the array in the world. Instead, the Mongo document should be archived (see #13) and the node in neo4j should be archived (see #12).

@joshdmiller joshdmiller changed the title [wip] migrate character -> relationships to neo4j [wip][falcor] world -> character, and character -> world Oct 6, 2016
@joshdmiller joshdmiller changed the title [wip][falcor] world -> character, and character -> world [falcor] world -> character, and character -> world Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant