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

Fixes Smile-SA/elasticsuite#1223 and improves select statement #1225

Closed
wants to merge 1 commit into from

Conversation

Swahjak
Copy link
Contributor

@Swahjak Swahjak commented Dec 8, 2018

Fixes #1223 and improves select statement

'qty' => 'stock_index.' . IndexStructure::QUANTITY,
]
);
->from($tableName, [
Copy link
Collaborator

Choose a reason for hiding this comment

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

It will only work if you're only using the default stock :

  • the table inventory_stock_1 is actually a view based on a join of cataloginventory_stock and catalog_product_entity so it does provide the product_id
  • any subsequent stock index table will only have columns sku, quantity and is_salable

Performance loss due to the extra join is negligible if not non-existent if only using the default stock.

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.

2 participants