JPA - nested element of the collection of embedded

I read the JPA specifications - and in section 2.6 (Collections of Embeddeble Classes and Base Types).

It states that "An embedded class contained in a collection of elements shall not contain a collection of elements."

I have a requirement for such a structure. I was wondering what is the standard way to get around this problem. That is, in order to have a set of elements, their type is a nested class that can contain a set of elements).

It is important for me to achieve this while maintaining it as an embedded class.

Thank.

+3
source share
1 answer

Have you considered subclasses of C?

, C_A C_B, C, A C_A B C_B. C_A C_B .

0

All Articles