JPA - nested collection element of embedded

I have read JPA specifications - and on section 2.6 (Collections of Embeddeble classes and basic types).

It says that "An embeddable class that is contained within an element collection, must not contain an element collection".

I have a requirement of such a structure. I was wondering what is the standard way to bypass this problem. That is, to have a collection of elements, that their type is an embeddable class, that may contain a collection of elements).

It is important for me to achieve this, while still keeping it as an embeddable class.

Thank you.

Answers


Have you considered subclassing C?

So you would have C_A and C_B which extends C, and A has a C_A and B has C_B. Then C_A and C_B can reference their parents..


Need Your Help

Subscription without any parameters

scala rx-scala

I need to write some RxScala code that creates an Observable from a text field in Scala Swing.

Center one the right div of a list

javascript jquery html css scrollto

i want to make my scroll go to the right div in a container, but every answer i tried failed.