Fix joins and value relations in WMS server