You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Craig Ching <cr...@gmail.com> on 2015/04/01 16:17:42 UTC
Datastax driver object mapper and union field
Hi!
We need to implement a union field in our cassandra data model and we're
using the datastax Mapper. Anyone have any recommendations for doing
this? I'm thinking something like:
public class Value {
int dataType;
String valueAsString;
double valueAsDouble;
}
If the Value is a String, do we need to store a double as well (and vice
versa)? Or should we convert the double to a java.lang.Double and null
it? If we did the latter, do we have to worry about tombstones?
Thanks and appreciate any advice!
Cheers,
Craig