Disable frozen checks in mapper


We added some validation logic to check the @Frozen annotations on mapped classes. The rationale was discussed on this pull request:

Currently, the mapper probably don't need the @frozen annotation to work. But not forcing it today means that if when there is non-frozen UDT it turns out that you do need the @frozen annotation for some things, then er might have a small upgrade problem.

So my inclination would be to require the annotation and check it because 1) we'll want it to generate schema anyway and 2) it's a guarantee that you won't have to force people to add back @frozen on all their pre-existing use of UDT when C* 3.0 comes out.

In retrospect, I think this was a bad idea: the rules for what can/must be frozen change between Cassandra versions, even within the same protocol version. For example, the following is allowed in 2.1.5 but not in 2.1.0:

The driver doesn't really know the target Cassandra version, it can look at the control host but that might be wrong in a mixed cluster.

So I think the driver should not try to validate the annotations too soon. We risk having out-of-date rules that will reject valid configurations.
When we introduce schema generation and if a user has misconfigured their annotations, they will find out when they try to execute the execute the DDL statements against their cluster (which is the true source for what is allowed or not).



Pull Requests



Olivier Michallat


Olivier Michallat

Fix versions