thakkarmeet
thakkarmeet
ATApache TinkerPop
Created by thakkarmeet on 8/28/2023 in #questions
Conditionally update one vertex property when another property matches a certain provided value
4 replies
ATApache TinkerPop
Created by thakkarmeet on 8/23/2023 in #questions
Trying to update a property value based on another property
I have a query that looks something like the following g.V('9999').hasLabel('someLabel').properties('PropertyName').hasId('1234').property('currentDate',12/12/2023).property('previousDate',10/10/2023) Using this query when an Id matches the passed value on hasId the data needs to be updated. I'm able to update currentDate & previousDate, which is a meta property, on the following data, however I'd also like to update the 'value' field which is on the same level as the 'id' field. My question is how do I tweak the query to also update the value along with the Dates. [ { "id": "1234", "value": "value", "label": "PropertyName", "properties": { "currentDate": 12/12/2023, "previousDate": 10/10/2023 } } ] https://stackoverflow.com/questions/76964792/gremlin-query-update-a-property-value-based-on-another-property
2 replies