I have below data struct create which represents a node and its predicates in Dgraph
//Namespace Data strcuture for Dgraph database
type Namespace struct {
Node
Name string `json:"name,omitempty"`
MarkForDeletion bool `json:"markfordeletion,omitempty"`
DeleteInitiationTime string `json:"deleteinitiationtime,omitempty"`
Owns []*Object `json:"owns,omitempty"`
AccessedBy []Account `json:"~access.to.namespace"`
AccessToPermission string `json:"access.to.namespace|permission,omitempty"`
}
The ‘DeleteInitiationTime’ predicate in Dgraph is expected to be a datetime data type and index with day.
In the above Golang code, I have the ‘DeleteInitiationTime’ as string because when I am using time.Time the commit fails with error “Transaction has been aborted. Please retry.”
Can you please suggest a solution for this?