Note that the Polish landed gentry (ziemianie or ziemiaństwo) was composed of any nobility that owned lands: thus of course the magnates, the middle nobility and that lesser nobility that had at least part of the village.
Who could compose the polish landed gentry?
any nobility that owned lands