Closed spring-projects-issues closed 6 years ago
Mark Paluch commented
Spring Framework and Spring Data have no tuple types. Cassandra has and it would be nice to support mapped tuples in some way.
Following Tuple2<T1, T2>
and so on is less context than say having a Point
type. A possible approach to mapped tuples could be:
@Tuple
class Point {
@Element(0) double x;
@Element(1) double y;
}
Tuples are cheaper to declare than user-defined types
John Blum commented
PR #120 reviewed, polished and merged to master
for the Spring Data (Cassandra) Lovelace M1 release
Mark Paluch opened DATACASS-284 and commented
Cassandra provides a
TupleType
which allows storing multiple values within one column/field as tuple. A tuple type is defined by a list of data types and does not require any further setup on Cassandra beyond the table definition. UDT's require, in comparison to tuple types, an additional type definition.Issue Links:
Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/120