What would be a right approach to write a Query for a findBy method?

It’s expecting the id and cas to be projected using the names shown in the error message (not _ID and _CAS). In the latest versions it will accept either.

Also - if your Customer entity class results in the document being stored with nested subscriptions, then attempting to retrieve with unnested subscriptions will probably not work out in the way you wish.