Query filter not applied in empty field

System Information
  • Strapi Version: 3.2.2
  • Operating System: Linux
  • Database: Postgres
  • Node Version: v12.18.2
  • NPM Version: 6.14.5
  • Yarn Version: 1.22.4

Im getting a issue with strapi, i would like to know if im doing something wrong or it is a real issue:


I have a field named readBy in an Entity called Entity Notification Event which is related to the User entity as a has many.

entity-notification-event hasMany Users

When i run the following code:

const hasUnreadNotifications = await strapi.query('entity-notification-event').find({
published_at_null: false,
readBy_ne: currentUser.id

It returns empty if the readBy field is empty, i just get a value when the readBy has some other users added.

Expected Result
I would like to get all the entity-notification-event where the current user is added yet