Created attachment 149563 [details] [review] Bug 33507: WIP This is a work in progress, have not been able to get the 'not equals' query to work, its documented as a comment in the code
Try that: { "agreement_packages.package_id": [ {"!=": 1}, {"=": null } ] } You want to list those that are not linked with the current one but also those that are not linked with any packages (it's a left join).