This adds support for the :key and :embed_key options for has_many associations in serializers and for the :key option of has_one associations.
There's currently no support for :embed_key on has_one associations, because it would require lookups on the foreign table of the association.
There's also a fix for coalesce on arrays that removes the restriction on integer keys which is required for :embed_key and to support non-integer primary keys, like UUIDs. The type specification in COALESCE is not needed, because it automatically casts the NULL replacement value to the type of the source expression.
This adds support for the
:key
and:embed_key
options forhas_many
associations in serializers and for the:key
option ofhas_one
associations.There's currently no support for
:embed_key
onhas_one
associations, because it would require lookups on the foreign table of the association.There's also a fix for coalesce on arrays that removes the restriction on integer keys which is required for
:embed_key
and to support non-integer primary keys, like UUIDs. The type specification inCOALESCE
is not needed, because it automatically casts theNULL
replacement value to the type of the source expression.