question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@ElementCollection does not work for collection of @Embeddable types

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
nitin02commented, Aug 1, 2016

@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.

0reactions
zak-hassancommented, Jul 31, 2016

@karthikprasad13 Downgrade to which version? I ran into the same issue as well.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found