fix: use correct join column

This commit is contained in:
Björn Fromme
2025-11-20 15:28:03 +01:00
parent 63ccda5b8a
commit 5c284c1f11
2 changed files with 5 additions and 3 deletions
@@ -119,9 +119,10 @@ class ProductApiMiddleware implements MiddlewareInterface
'hotel.features',
'hotel.room_types',
'hotel.additional_information',
'hotel.address',
)
->from('tx_epproducts_domain_model_hotel', 'hotel')
->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.uid AND alias.entity_type="hotel"')
->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.entity AND alias.entity_type="hotel"')
->where(
$queryBuilder->expr()->orX(
$queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)),
@@ -147,6 +148,7 @@ class ProductApiMiddleware implements MiddlewareInterface
'features' => $hotel['features'],
'roomTypes' => $hotel['room_types'],
'additionalInformation' => $hotel['additional_information'],
'address' => $hotel['address'],
'images' => $images,
];
}