Smile-SA / mongogento

98 stars 48 forks source link

addAttributeToFilter() #27

Open yusrub opened 7 years ago

yusrub commented 7 years ago

Hi,

I am working on mongo and after importing all mysql product attributes from mysql to mongo-db and it worked smooth and when I checked the mongo-db, found different attributes have different data type few are (Int32,String...).

So when we add custom attributes like discontinued using the function addAttributeToFilter then I did not get records and after reviewing all things found that there is difference of data type as I am passing this custom attribute as string and it is Int32 in mongo-db due to that records did not found as there is mis-match of data type.

So in my opinion, there is an functionality is missing when we add to filter an custom attribute to addAttributeToFilter which used to _buildDocumentFilter. So before building filter it should first convert that filter it to data-type which we set in mongo-db while importing.