graph - Storing data as an array/list on neo4j property -


i new neo4j , have following problem @ hand. trying develop social networking site wherein store message exchanged between 2 users on relationship property. this, trying store messages in form of array/list on relationship property. can please suggest if neo4j provides such types of operation.

i know if insert message on relationship property , array/list updates(i.e adds new message on next index)

for ex:

user1 -> user2 : hi, whats  user2 -> user1 : hi, in college  relationship property stores message in form of list such as: ["hi,whats up", "hi, in college"] 

something in manner..... thanks

neo4j supports array properties, see http://neo4j.com/docs/rest-docs/current/#rest-api-property-values.

however i'm not sure if you're using modeling approach here. if store messages in array don't have timeline of conversation explicit in graph. worse if user1 sends 2 messages user2 without response user2 in between, you'll don't know longer sender , receiver.

therefore think of introducing node representing conversation. conversation related 2 users. relationship points start (or end) of message flow within conversation. messages linked next and/or previous relationships each other.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -