caminte icon indicating copy to clipboard operation
caminte copied to clipboard

Query criteria is not working correctly in Redis

Open kmlwlkwk opened this issue 7 years ago • 1 comments

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 avatar Mar 14 '17 01:03 kmlwlkwk

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

kmlwlkwk avatar Mar 14 '17 21:03 kmlwlkwk