What's the difference between Element setProperty and TitanVertex addProperty in Blueprints?

StackOverflow https://stackoverflow.com/questions/22366327

Frage

What is the difference between the Blueprints methods vertex.addProperty(key, value); implemented in TitanVertex and vertex.setProperty(key, value); in Element?

If there is a difference, how can I translate addProperty into setProperty?

War es hilfreich?

Lösung

Titan has the notion of multi-properties which is not a part of the Blueprints API. A multi-property "allows a list of values on this property key for each vertex. This is useful when a property key is multi-valued, like "email" for example, since a user can have multiple email addresses".

If you use multi-properties then you can only set them via TitanVertex.addProperty. You can't set them via any Blueprints methods.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top