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 issue #3704 regarding integer attribute values being cast to decimal #3705

Merged
merged 3 commits into from
Jul 6, 2016

Conversation

digitalpianism
Copy link
Contributor

No description provided.

{
$select = implode(' UNION ALL ', $selects);
}
else $select = $selects;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix code style:

if (..) {
} else {
}

@davidalger
Copy link
Member

@digitalpianism Thank you for your contribution. Please accept the contributors license agreement so this PR can be further processed. This can be done by clicking the "Details" link next to the "license/cla" check below.

@digitalpianism
Copy link
Contributor Author

@antonkril I've provided a quick test to show how to replicate the bug in the issue: #3704

@digitalpianism
Copy link
Contributor Author

@davidalger I've done that about 3 different times on 2 different browsers but it doesn't seem to work even if it tells me "thanks for signing CLA, we're redirecting you to github"

I've tried revoking the OAuth access from my account but still doesn't work

@digitalpianism
Copy link
Contributor Author

@davidalger ok done, the email address I'm using to commit code had not been verified my bad ;)

@vkublytskyi
Copy link

@digitalpianism Thank you for so deep investigation of the issue and provided fix. But please pay attention that Magento\Eav\Model\ResourceModel\Helper::getLoadAttributesSelectGroups() is also used in Magento\Eav\Model\Entity\AbstractEntity so it should be also modified as Magento\Eav\Model\Entity\Collection\AbstractCollection.

However this fix may decrease performance as count of requests to DB will be increased. To improve performance Magento\Eav\Model\ResourceModel\Helper::getLoadAttributesSelectGroups() may combine selects for varchar, text and datetime in one group.

Also as issue appears only in case when only decimal and integers attributes are present due to MySQL casting logic for union statement fix without performance degradation may be provided. For this we need to use "CAST(value AS char)" expression.

@digitalpianism
Copy link
Contributor Author

@vkublytskyi thanks for your comment, I'm about to make another commit regarding the Magento\Eav\Model\Entity\AbstractEntity.

I agree with you regarding the performance issue, my main goal was to fix the bug, I did not focus on how to refactor the framework to get that bug fix optimized, I guess there's people more experienced than me to do so.

@vkublytskyi
Copy link

@digitalpianism Thanks for your contribution and for catching this bug.
We will investigate performance degradation and apply improvements if needed. Internal ticket to merge pull request and fix possible performance issues is MAGETWO-50319

@piotrekkaminski
Copy link
Contributor

The issue is being processed now.

@okorshenko okorshenko merged commit 3f9b64b into magento:develop Jul 6, 2016
magento-engcom-team pushed a commit that referenced this pull request Feb 8, 2019
…ery-core

[Owls] Product associated to website & MFTF migration to core
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.

7 participants