Hi all,
I'm using neomodel and I have the following models:
class ForumElement(StructuredNode):
uid = UniqueIdProperty()
created_at = DateTimeProperty(default=dt.datetime.utcnow())
text = StringProperty()
is_visible = BooleanProperty(default=True)
picture = Relationship(Picture, 'HAS_PICTURE')
author = Relationship(User, 'HAS_USER')
class Post(ForumElement):
title = StringProperty(default="")
latitude = FloatProperty()
longitude = FloatProperty()
tags = Relationship(Tag, 'HAS_TAGS')
class Comment(ForumElement):
parent = Relationship(ForumElement, 'HAS_PARENT')
With that code I have in the database something like the following, where in blue we have "comments" and in pink we have "post".
Now, I would like to have as result of a query a list of couple <parent.uid, childen.uid>, how could I obtain that? Notice that the parent of a Comment could be a Post or another Comment