cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Specific order of nodes


My database will look like something like this. Now, this will on the website be shown in various lists, and I want the user to be able to choose where in the list each 'board' is. Is there any way to make eg. the 'subboards' have a set order that you can actively change(drag and drop on the client side)? Or will I have to do it by eg. having a list inside the parent node, where they are ordered(I assume that would be possible somehow)?

2 REPLIES 2

Wouldn't just using an attribute of PlacementOrder in the nodes work? Then as the UI reorders the list you'd have to send back to the database the queries to update the nodes and their order value. Same issue you'd have with any other database, if you're keeping an ordered list, you have to have column in your table to maintain the list order.

I suppose you could get really "graphy" and instead of an attribute you could use Prev and Next relationships between the nodes to create a linked-list of nodes. You'll still need to send the data back to the DB whenever the sort order changed to update the linked list order.

2X_f_f7e5be63cbf5e5fb9e3251058b1c0076a7d603ca.png

Oh damn! How did I not think of that, thanks.