blogtitle,descriptionHello world,description ' Hello Directus 'save as copy
5.delet this copy
6.filter user logical
const getparams = {
meta:"result_count",
fields: "id,title,description",
filter: {
title:{
logical:'or',
contains: 'Hello'
},
description:{
logical:'or',
contains: 'Hello'
}
},
status: "published"
}
client.getItems("blog",getparams).then((res) => {
console.log('list',res.data)
});
6.The deleted data can also be queried because there is this item in the database.
master branch]Hey @cdwmhcc ,
I am not able to reproduce this issue as when I deleted the duplicate entry, it was deleted from DB too. So I got the single entry only instead of both of them.
@bjgajjar @benhaynes https://rangerstudio.slack.com/files/UHQ1E2J5Q/FJV1W8073/20190528_081912.mp4
This issue will replicate if you have status field in your collection. And issue occurs cause of MySQL where condition priority. For your filters; query have the condition like
WHERE
titleLIKE '%Hello%' ORtitle_desLIKE '%Hello%' ANDstatusIN ('published', 'draft')
But it should like
WHERE (
titleLIKE '%Hello%' ORtitle_desLIKE '%Hello%') ANDstatusIN ('published', 'draft')
I found the problem. Will send the PR ASAP.
Most helpful comment
This issue will replicate if you have
statusfield in your collection. And issue occurs cause of MySQL where condition priority. For your filters; query have the condition likeBut it should like
I found the problem. Will send the PR ASAP.