From bbe933ec888122425959c179893b19efaea1233e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotn=C3=BD?= Date: Wed, 3 Jan 2024 10:52:53 +0100 Subject: [PATCH] fix(#392): Cannot fetch bodies for multiple entities from multiple collections When using multiple globally unique identifiers in single query to fetch entities where each entity is from different collection AND entity body is wanted, like so: ``` query( filterBy( attributeInSet("url", "/en/macbook-pro-13-2022", "/en/cell-phones"), entityLocaleEquals("en") ), require( entityFetch( attributeContent("code") ) ) ) ``` evitaDB returns error ``` Entity `Product` with primary key `63049` cannot be enriched because it has been already removed. ``` If both URLs would target the same collection, both entities would be returned with their bodies as expected. --- .../evitadb/api/EntityByAttributeFilteringFunctionalTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evita_functional_tests/src/test/java/io/evitadb/api/EntityByAttributeFilteringFunctionalTest.java b/evita_functional_tests/src/test/java/io/evitadb/api/EntityByAttributeFilteringFunctionalTest.java index 37a37fd1b..10c569393 100644 --- a/evita_functional_tests/src/test/java/io/evitadb/api/EntityByAttributeFilteringFunctionalTest.java +++ b/evita_functional_tests/src/test/java/io/evitadb/api/EntityByAttributeFilteringFunctionalTest.java @@ -2858,7 +2858,8 @@ void shouldReturnEntitiesFromDifferentCollectionsByEqualsToGlobalLocalizedAttrib require( page(1, 1), entityFetch( - attributeContent(ATTRIBUTE_URL) + attributeContent(ATTRIBUTE_URL), + dataInLocales(Locale.ENGLISH) ) ) )