Allow passing null id to mean select all rows
Fix logic extracting enum/set values from db