You're right, I missed that we were re-assigning params.primaryKey. I'm used to our other approach for optional assignment that we tend to use, i.e. `foo =  condition || bar`, but I see that approach would not accommodate too well a compound condition such as this.