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

Fixed issue #2212 SQLSTATE[42S22]: Column not found: 1054 Unknown col… #2221

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

kiatng
Copy link
Contributor

@kiatng kiatng commented Jun 13, 2022

…umn 'password_created_at' in 'field list'

Description (*)

The exception is because password_created_at is not a static attribute, it's not in the customer_entity table,

Related Pull Requests

PR #546

Fixed Issues (if relevant)

Issue #2212

Manual testing scenarios (*)

Questions or comments

…nown column 'password_created_at' in 'field list'
@github-actions github-actions bot added the Component: Customer Relates to Mage_Customer label Jun 13, 2022
@fballiano
Copy link
Contributor

I'd like to hear from @colinmollenhour before merging but thanks!

@fballiano
Copy link
Contributor

would it be possible not to have the 2 joins? using a query like this would be enough?

select customer_entity_int.value from eav_attribute JOIN customer_entity_int ON (eav_attribute.attribute_id=customer_entity_int.attribute_id and eav_attribute.entity_type_id=customer_entity_int.entity_type_id) where eav_attribute.attribute_code='password_created_at' and eav_attribute.entity_type_id=1 and customer_entity_int.entity_id=?

it's with a single join instead of two.

dunno if the performance is so much better or worse.

@kiatng
Copy link
Contributor Author

kiatng commented Jun 15, 2022

@fballiano I do not see how it can be only one join because:

$field = $this->_getReadAdapter()->getIfNullSql('t2.value', 't0.created_at');

We need to take created_at from the main table (t0) customer_entity in case password_created_at (t2.value) is null. Or am I missing something?

Copy link
Contributor

@fballiano fballiano left a comment

Choose a reason for hiding this comment

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

tested and working

@fballiano fballiano merged commit ae234cc into OpenMage:1.9.4.x Jun 15, 2022
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit ae234cc. ± Comparison against base commit 1bcaac5.

@kiatng kiatng deleted the issue2212 branch February 27, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Customer Relates to Mage_Customer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR 546 - Avoid session invalidation when changing session lifetime - kills my deployment
3 participants