cayley
cayley copied to clipboard
How cayley query the data belong to blank node
@dennwc @tamethecomplex thanks very much.
After I read up the
- https://github.com/tamethecomplex/tutorial-documents/blob/master/cayley/BeginnersGraphDatabaseSchemaDesign.md
- https://discourse.cayley.io/t/beginners-guide-to-schema-design-working-thread/436
and other materials, i designed and played with the following n-quads data:
</users/23TplPdS> <userId> "23TplPdS" .
</users/23TplPdS> <userSetId> "XXXX" .
</users/23TplPdS> <realName> "XXX" .
</users/23TplPdS> <displayName> "lnshi" .
</users/23TplPdS> <gender> "M" .
</users/23TplPdS> <email> "[email protected]" .
</users/23TplPdS> <isEmailVerified> "false" .
</users/23TplPdS> <mobilePhone> _:l8 .
_:l8 <isVerified> "false" .
_:l8 <alpha3CountryCode> "+65" .
_:l8 <mobilePhoneNoWithCountryCallingCode> "+658672xxxx" .
</users/46Juzcyx> <userId> "46Juzcyx" .
</users/46Juzcyx> <userSetId> "xx.xx.xx_0000" .
</users/46Juzcyx> <realName> "XXXX" .
</users/46Juzcyx> <displayName> "Leonard Shi 0000" .
</users/46Juzcyx> <gender> "M" .
</users/46Juzcyx> <email> "[email protected]" .
</users/46Juzcyx> <isEmailVerified> "false" .
</users/46Juzcyx> <mobilePhone> _:l20 .
_:l20 <isVerified> "false" .
_:l20 <alpha3CountryCode> "+65" .
_:l20 <mobilePhoneNoWithCountryCallingCode> "+6586720000" .
</users/hwX6aOr7> <userId> "hwX6aOr7" .
</users/hwX6aOr7> <userSetId> "LEONARD__SHI_0001" .
</users/hwX6aOr7> <realName> "LEONARD SHI" .
</users/hwX6aOr7> <displayName> "Leonard Shi 0001" .
</users/hwX6aOr7> <gender> "M" .
</users/hwX6aOr7> <email> "[email protected]" .
</users/hwX6aOr7> <isEmailVerified> "false" .
</users/hwX6aOr7> <mobilePhone> _:l32 .
_:l32 <isVerified> "false" .
_:l32 <alpha3CountryCode> "+65" .
_:l32 <mobilePhoneNoWithCountryCallingCode> "+6586720001" .
</users/46Juzcyx> <follows> </users/23TplPdS> .
</users/hwX6aOr7> <follows> </users/23TplPdS> .
but with Gremlin query g.V("</users/23TplPdS>").Out().All()
, i get the following data:
{
"result": [
{
"id": "23TplPdS"
},
{
"id": "M"
},
{
"id": "XXX"
},
{
"id": "false"
},
{
"id": "_:l8"
},
{
"id": "Leonard Shi"
},
{
"id": "XXXX"
},
{
"id": "[email protected]"
}
]
}
the data belong to blank node _:l8
are all gone from the result.
So how can I query the data which belong to blank node, or I design the model wrongly?
This is the problem of current Cayley design that we want to change as a part of #510.
You cen get actual data if you try to follow g.V("_:18").Out().All()
, but this means everyone need to write the library to follow such links. Thus, we will provide this functionality.
@dennwc ok, got it, thank you very much.
should we keep this open, or just keep the #510 open and close this one?
Let's leave it open for now. #510 will cover the transition to new design and this one will track additional functionality for blank nodes.