Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate existent documents on insert edge #136

Closed
yguad opened this issue Nov 13, 2018 · 4 comments
Closed

Validate existent documents on insert edge #136

yguad opened this issue Nov 13, 2018 · 4 comments

Comments

@yguad
Copy link

yguad commented Nov 13, 2018

When I insert a document with type edge, if I don't send the whole object referenced in _from and in _to it has a strange behavior. It would very good the possibility of to send only identifiers.
Is it possible to send the vertx references (identifier, for example "collection/1234") in the _from and _to fields and validate spring-data if they exist before inserting them?

@Simran-B
Copy link
Contributor

it has a strange behavior

Can you please the describe the behavior?

@mvollmary
Copy link

Is it possible to send the vertx references (identifier, for example "collection/1234") in the _from and _to fields and validate spring-data if they exist before inserting them?

Validating of edges in ArangoDB is only possible through named graphs and the corresponding graph REST API, which is currently not supported by Spring Data ArangoDB. There is an open feature request for that but no ETA.

@yguad
Copy link
Author

yguad commented Nov 14, 2018

ArangoDB spring-data allows me insert edges when the _from or _to referenced documents doesn't exists.
Thanks @mpv1989 for your reply. I would not like it use rest api. I found a way to implement using directly the arangodb driver but it would be interesting to configure it using spring data.

@rashtao
Copy link
Collaborator

rashtao commented Sep 6, 2021

Since ArangoDB graphs API does not support overwriting (https://www.arangodb.com/docs/stable/http/gharial-edges.html#create-an-edge), it is not suitable for implementing save method in ArangoRepository, which requires insert/replace behavior.
Therefore for the moment, support to named graphs API can only be implemented in the ArangoTemplate API.

Closing for now, please refer to #76 for further discussion.

@rashtao rashtao closed this as completed Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants