@ElementCollection does not work for collection of @Embeddable types
See original GitHub issueI am trying to include a Element Collection to my Entity which has other columns of basic type too such as,
@ElementCollection
private List<Statement> statements;
Statement is Embeddable, so ideally, equivalent type in cassandra should be,
statements List<frozen<Statement>>
However, it changes my entire Entity structure to below,
key text,
column1 text,
"" map<text, blob>,
PRIMARY KEY (key, column1)
Note that embedding just the Statement object is proper,
@Embedded
private Statement statement;
is created as,
statement frozen<Statement>
I’m using Kundera 3.5 and the latest version of Kundera-Cassandra driver. Thank you for your help.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
Moving @ElementCollection to @Embeddable class not working
I don't know why. But assigning with a collection works. @Embeddable public class Doubles { @ElementCollection private List<Double> doubles ...
Read more >ElementCollection not updated correctly if the Embeddable ...
I have an @ElementCollection that is a collection of @Embeddable components. When saving an updated entity I can see that Hibernate issues an...
Read more >JPA - Persisting Collections of embeddable type by ... - LogicBig
A quick overview of collection of embeddable types in JPA ... a collection of embeddable class can be persisted by using @ElementCollection ......
Read more >Element collection Vs One to Many in JPA and Hibernate
It means that the collection is not a collection of entities, but a collection of simple types (Strings, etc.) or a collection of...
Read more >ElementCollection Example in Hibernate/JPA Using Spring Boot
We will see how to use @ElementCollection annotation to map a collection of a basic type(String, Integer etc) and embeddable types(User ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@zmhassan Version downgrade does not solve the issue. I guess, one’d have to wait for the next release for a proper fix. Until then, @karthikprasad13 suggests to manually create the tables and proceed.
@karthikprasad13 Downgrade to which version? I ran into the same issue as well.