orientechnologies / orientdb-gremlin

TinkerPop3 Graph Structure Implementation for OrientDB
Apache License 2.0
91 stars 32 forks source link

Determining if a Vertex or Edge has been modified? #118

Closed fppt closed 7 years ago

fppt commented 7 years ago

Hello Again,

Is there a way to know if a Vertex or Edge has been modified?

For example TitanDB has TitanVertex#isModified(). Is there anything similar ? I can't find anything in OrientVertex or OrientElement.

Can anyone point me as to how I may implement this if needs be?

Thanks,

Filipe

lvca commented 7 years ago

You can use vertex.getRecord().isDirty(). If true, it has been modified. You can also access to what has been modified:

fppt commented 7 years ago

Thanks @lvca . That's brilliant.