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

fix(#579): Exception when querying non-existent entity by unique attribute #580

Merged

Conversation

novoj
Copy link
Collaborator

@novoj novoj commented May 29, 2024

No description provided.

novoj added 2 commits May 29, 2024 14:47
…ibute

When we query entity by unique attribute like URL and this entity is not found. We get:

```
app//io.evitadb.api.exception.EntityCollectionRequiredException.<init>(EntityCollectionRequiredException.java:46)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.lambda$computeInternal$0(EntityFilteringFormula.java:89)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula$$Lambda$2115/0x0000000801594698.get(Unknown Source)
app//io.evitadb.utils.Assert.isTrue(Assert.java:135)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.computeInternal(EntityFilteringFormula.java:87)
```

Unfortunately, it was not possible to write a test for this case because it required special composition of the query, data and also enabled observability facilities.
…ibute

When we query entity by unique attribute like URL and this entity is not found. We get:

```
app//io.evitadb.api.exception.EntityCollectionRequiredException.<init>(EntityCollectionRequiredException.java:46)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.lambda$computeInternal$0(EntityFilteringFormula.java:89)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula$$Lambda$2115/0x0000000801594698.get(Unknown Source)
app//io.evitadb.utils.Assert.isTrue(Assert.java:135)
app//io.evitadb.core.query.algebra.prefetch.EntityFilteringFormula.computeInternal(EntityFilteringFormula.java:87)
```

Unfortunately, it was not possible to write a test for this case because it required special composition of the query, data and also enabled observability facilities.
@novoj novoj linked an issue May 29, 2024 that may be closed by this pull request
@novoj novoj changed the title 579 exception when querying non existent entity by unique attribute fix(#579): Exception when querying non-existent entity by unique attribute May 29, 2024
@novoj novoj merged commit e788035 into dev May 29, 2024
1 check passed
@novoj novoj deleted the 579-exception-when-querying-non-existent-entity-by-unique-attribute branch May 29, 2024 13:31
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.

Exception when querying non-existent entity by unique attribute
1 participant