fixed hasOneSubRequest bug -> take the right primaryKey