If someone passes an array to a field where a list is expected, what should be done? Currently we die; but again, that sucks for such a common problem.
My proposal in this case would be to do a join on the passed fields into a string: so if {"unique":true} for persons, but someone passes in ["Obama","Bush"], we could store a value of Obama--Bush calculated as
"--".join(input)
This might leave people confused about what happened, but would often produce relatively sensible results.
This is the inverse issue of issue 36.
If someone passes an array to a field where a list is expected, what should be done? Currently we die; but again, that sucks for such a common problem.
My proposal in this case would be to do a join on the passed fields into a string: so if {"unique":true} for persons, but someone passes in
["Obama","Bush"]
, we could store a value ofObama--Bush
calculated asThis might leave people confused about what happened, but would often produce relatively sensible results.