technological-jadeT
Refine13mo ago
4 replies
technological-jade

nested filter query null issue

hello if I entered in the search bar a phone number while am saying the filtering query is uuid_user_id.phone what happens is all the records stays the same but the records of people who should not be returned are returned but null so I have the same number of records but some of them are null I will give you and example

here is my raw data returned from db:
[
{
"branch_id": 1,
"id": 5,
"role_id": {
"id": 1,
"name": "Parent"
},
"uuid_user_id": {
"email": "x1@gmail.com",
"id": "09150311-f672-4a9c-af0c-b150c8a64d0a",
"phone": "0114xxxx"
}
},
{
"branch_id": 1,
"id": 6,
"role_id": {
"id": 2,
"name": "Teacher"
},
"uuid_user_id": {
"email": x2@gmail.com",
"id": "a3ef5c76-3d58-4340-8f16-a0721eb2e286",
"phone": "0102xxxx"
}
},
{
"branch_id": 1,
"id": 7,
"role_id": {
"id": 3,
"name": "admin"
},
"uuid_user_id": {
"email": "x3@gmail.com",
"id": "fa768d1d-2b57-48be-b91b-6d3d1f03f980",
"phone": "01515"
}
},

]


and below is the filtered data after i entered 011

[
{
"branch_id": 1,
"id": 5,
"role_id": {
"id": 1,
"name": "Parent"
},
"uuid_user_id": {
"email": "x1@gmail.com",
"id": "09150311-f672-4a9c-af0c-b150c8a64d0a",
"phone": "0114xxxx"
}
},
{
"branch_id": 1,
"id": 6,
"role_id": {
"id": 2,
"name": "Teacher"
},
"uuid_user_id": null
},
{
"branch_id": 1,
"id": 7,
"role_id": {
"id": 3,
"name": "admin"
},
"uuid_user_id": null
},

]


you will find they are the same just some records has uuid_user_id = null
Was this page helpful?