biggora / caminte

Cross-db ORM for NodeJS
http://www.camintejs.com/
MIT License
1.08k stars 119 forks source link

Query criteria is not working correctly in Redis #140

Open kmlwlkwk opened 7 years ago

kmlwlkwk commented 7 years ago
Visit
            .find(
                {
                    where: {
                        status: {nlike: 'finished'},
                        slug: params.slug
                    },
                    order: 'createdAt DESC'
                },
                function (error, visits) {
                    if (error) reject(error);
                    else {
                        console.log(visits[0].status == 'finished'); //true
                        resolve(visits);
                    }
                }
            );

it's strange that I'm getting only subset of Visit with status 'finished' having slug = params.slug even if I update this model

kmlwlkwk commented 7 years ago

I changed database from redis to mongodb. After data migration, everything work as expected