Generate accessors for keys in constraint tables