implement locking at querybuilder level