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

Select or join bug when requesting hasMany elements that may or may not have a certain child value #356

Open
spl1nes opened this issue Jan 27, 2024 · 0 comments

Comments

@spl1nes
Copy link
Member

spl1nes commented Jan 27, 2024

File: phpOMS/DataStorage/Database/Mapper/ReadMapper.php

The following mapper get example doesn't return any attributes that have no value/l11n component:

VehicleMapper::get()
    ->with('attributes')
    ->with('attributes/type')
    ->with('attributes/value')
    ->with('attributes/type/l11n')
    ->with('attributes/value/l11n')
    ->where('id', (int) $request->getData('id'))
    ->where('attributes/type/l11n/language', $response->header->l11n->language)
    ->where('attributes/value/l11n/language', $response->header->l11n->language)
    ->execute();

Only some attribute values have a localization but if we perform the above mentioned get we will only get the attributes that have a value with a l11n.

For the type this is no problem since all types have a l11n.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant