mongogento icon indicating copy to clipboard operation
mongogento copied to clipboard

addAttributeToFilter()

Open yusrub opened this issue 8 years ago • 0 comments

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.

yusrub avatar Jul 21 '16 16:07 yusrub