-
Notifications
You must be signed in to change notification settings - Fork 49
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
_loadAttributes() #26
Comments
+1 |
Because Attributes can come from both mysql and mongodb - you would want to load from both and merge otherwise you will not load all attributes! That is my understanding from using this extension! |
ok thanks for your reply we are saving all attributes of product in mongo-db is am right? |
public function getSqlAttributesCodes() These Attributes are never stored in mongodb! |
If we are still querying the the MYSQL for Attributes would it not kill purpose of using MongoDB? After all that's the whole purpose of using it and avoid querying EAV tables which in this case we are not, in fact it will slow down further, because we will be querying both EAV and now an additional request is sent to Mongo. The attributes you mentioned are already in Mongo. |
Hi Southerncomputer, If you import data from mysql to mongo db using shell script, you will see all these attributes stored in mongo-db |
Hello everybody. @southerncomputer is right, there is some attributes that are kept into MySQL. These attributes are used when rebuilding Magento indexes, so we make them stay in MySQL to avoid having to rewrite all indexes processes. If you remove this data from MySQL, there won't be any index process running properly on your website, so the site may be broken. Concerning the fact that we are loading these attributes from MySQL when loading a collection, I agree that it may does nothing. Let's take a look at this : https://github.com/Smile-SA/mongogento/blob/master/src/app/code/community/Smile/MongoCatalog/Model/Resource/Override/Catalog/Product/Collection.php#L461
This would mean that when reaching this piece of code : http://doc4dev.net/doc/Magento/1/source-class-Mage_Eav_Model_Entity_Collection_Abstract.html#1076 The variable Feel free to test without the parent calls to _loadAttributes and let me know. Regards |
I tested without the parent calls to _loadAttributes and it worked fined for me |
Perhaps it was legacy before the attribute migration tool that existed - so you could load attributes from mysql and save them to mongodb! I remember that being the case before the migration tool existed you had to load each product from mysql and save() it to move the attributes to mongodb. |
Hi,
I am working on this extension and found a function public function _loadAttributes($printQuery = false, $logQuery = false) in class Smile_MongoCatalog_Model_Resource_Override_Catalog_Product_Collection
`public function _loadAttributes($printQuery = false, $logQuery = false)
{
parent::_loadAttributes($printQuery, $logQuery);
my question is that did we need to call parent::_loadAttributes($printQuery, $logQuery); this function to load attributes from mysql as it return all attributes which is then useless to load the data in below code.
can we removed parent::_loadAttributes($printQuery, $logQuery); this part or thier is any logic/point .
can you explained
thanks in advanced
The text was updated successfully, but these errors were encountered: