@UserDefinedType can be used to auto-create user types on schema generation.
However, it does not seem to be supported when a @UserDefinedType object has a property which is also a user defined type.
I have added a sample project attached which demonstrates the problem.
If schema generation is configured:
spring.data.cassandra.schema-action=RECREATE
Then the app will crash on startup trying to create the user defined types:
Thanks for reporting this issue which is actually a bug. We have some code to determine dependencies between user-defined types to create types in Apache Cassandra in the right order
Michel Zanini opened DATACASS-406 and commented
Hi,
@UserDefinedType
can be used to auto-create user types on schema generation.However, it does not seem to be supported when a
@UserDefinedType
object has a property which is also a user defined type.For example:
I have added a sample project attached which demonstrates the problem.
If schema generation is configured:
spring.data.cassandra.schema-action=RECREATE
Then the app will crash on startup trying to create the user defined types:
However, if schema generation is disabled:
spring.data.cassandra.schema-action=NONE
And the schema is created manually, then the mapping is supported and it read and save data correctly.
This nested structure is supported by Cassandra. By Spring Data is only supported if used without schema generation.
Can we support auto creation of these nested types for auto creating the schema, please?
Affects: 1.5.1 (Ingalls SR1), 2.0 M1 (Kay)
Attachments:
Referenced from: pull request #100
Backported to: 1.5.1 (Ingalls SR1)
The text was updated successfully, but these errors were encountered: