You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I guess you try to avoid serializing an entity twice, but if the first entity doesn't contain the data, then the data is missing down another branch the entity-tree.
E.g. product -> visibilities -> salesChannel does not contain domains
product -> seoUrls -> salesChannel -> domains contain the domains
But because the first salesChannel was already added, the second is skipped.
Workaround
As expected, with criteria.addAssociation('visibilities.salesChannel.domains'); as a workaround the domains are added in the beginning and therefore not a wrong caching instance is used.
The text was updated successfully, but these errors were encountered:
PHP Version
PHP 7.4.26 (cli) (built: Nov 22 2021 09:47:55) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.26, Copyright (c), by Zend Technologies with Xdebug v3.0.3, Copyright (c) 2002-2021, by Derick Rethans
Shopware Version
v6.4.7.0 Stable Version
Expected behaviour
When I add an association to a product like this:
Then I expect the response from the API to include all domains on the salesChannel.
Actual behaviour
The domain is missing.
How to reproduce
And then have a look into the network tab.
Problem
The problems originates most likely here:
If I remove the first lines, then the missing domain is there.
So I guess you try to avoid serializing an entity twice, but if the first entity doesn't contain the data, then the data is missing down another branch the entity-tree.
E.g. product -> visibilities -> salesChannel does not contain domains
product -> seoUrls -> salesChannel -> domains contain the domains
But because the first salesChannel was already added, the second is skipped.
Workaround
As expected, with
criteria.addAssociation('visibilities.salesChannel.domains');
as a workaround the domains are added in the beginning and therefore not a wrong caching instance is used.The text was updated successfully, but these errors were encountered: