Skip to content

Conversation

@PauloFerreira25
Copy link
Contributor

Gentlemen, please accept my correction.

This is the case where explaining the problem is much more difficult than solving it. :)

I use ArangoDB with Multi Tenancy together with Spring Repository. I found that when querying a Collection that doesn't exist with FindOne, it returns that the collection doesn't exist. Which makes sense, but other things like the native findAll, create the collection instead of giving the error and return empty. So findOne, which should return an Optional .empty(), but it would return an Execption. Creating an inconsistency.

In this way, we had an inconsistency. Either it should always come back empty, or it should always come back Execption.

Well, the solution is just one line, do the Collection check within the custom find method. The creation of the Collection is already native if it does not exist when checking.

I also created a configuration class and a test class for using the repository. But they are completely optional.

Thank you very much for your attention.

@PauloFerreira25 PauloFerreira25 changed the title Creating the collection when you findOne Create the collection in Multi Tenancy on findOne May 11, 2020
@rashtao rashtao self-assigned this May 12, 2020
@rashtao
Copy link
Collaborator

rashtao commented Jul 16, 2020

Hi @PauloFerreira25

Many thanks for contributing. We are obliged by law to have a signed scanned copy of a Contributor License Agreement (CLA) to be able to accept pull requests to the official ArangoDB repository - even for such small changes.

We use an Apache 2 CLA for ArangoDB and its companion projects, which can be found here: https://www.arangodb.com/documents/cla.pdf Just fill in the form, sign and send a scanned copy over to cla@arangodb.com

Thank you

@rashtao
Copy link
Collaborator

rashtao commented Jul 16, 2020

@PauloFerreira25 Also the source branch of this PR does not exist, can you please fix it?

@PauloFerreira25
Copy link
Contributor Author

PauloFerreira25 commented Jul 16, 2020

Hello, I was going to write to explain about the branch and ended up closing PR by mistake. :( Excuse me.

I usually delete branches and even forks after creating a PR. I don't know if I can "recreate" and "relink" a PR to a new branch.

If you want, you can include the code inside the project, doing as a self code. I'm more concerned with adjusting the driver for a more "consistent" use than having my name in PR. I'm sorry if that phrase was rude. PS: I already signed the CLA.

if you really need, I can start again. I do a new fork again, separate each of my PRs into a new branch, and recreate all PRs. It will give me trouble, but I will do it if it is not lost work. do that and spend 3 months waiting for PR, again.

My development team and I have already created a fork of this driver and we are already well ahead of corrections and improvements for the driver.

I would love to have a channel to explain what we are doing with Arango and consequently explain why this "crazy" PR.

For us, it would be very important to stop using a separate fork and keep using the main project. In this way, we win, you win and the community wins.

Please reopen this PR if you have the privilege or implement the correction, just to not miss the "bug report".

@rashtao
Copy link
Collaborator

rashtao commented Jul 17, 2020

This PR cannot be reopen since The repository that submitted this pull request has been deleted. So please create a new one and keep the modified forked branch.

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

Successfully merging this pull request may close these issues.

2 participants