cassandra_ecto icon indicating copy to clipboard operation
cassandra_ecto copied to clipboard

Replace `:binary_id` with `Ecto.UUID`

Open mrusme opened this issue 7 years ago • 1 comments

As documented on this issue here, it's impossible to get Poison.Encoder to derive valid JSON from an Cassandra Ecto repo, as long as :binary_id was set as the type for the @primary_key. It took me a day to dig into this issue and try & error - in the end José suggested to try Ecto.UUID instead of :binary_id, which seems to have does the trick.

Maybe you would like to adjust the documentation for Cassandra Ecto so that it mentions this solution for everyone else who might have this issue while using Cassandra UUID primary keys?

mrusme avatar Apr 09 '17 14:04 mrusme

Update: According to @michalmuskala this might be a bug in cassandra_ecto's implementation.

mrusme avatar Apr 09 '17 17:04 mrusme