Extending the embeddable class in JPA

I extended an embeddable class ABC from another embeddable class XYZ The object of ABC is embedded in an entity The table corresponding to the entity contains only ABC elements, not XYZ elements What can I do to get them?

I heard that descriptor customizer will work What should I do? Is there any other way?

Solution

This document of Oracle JavaEE may help you According to this, inheritancetype SINGLE_ Table is the default policy Depending on your requirements, you may need inheritancetype TABLE_ PER_ CLASS.

It is described in the entity inheritance mapping policy topic, but I believe it also applies to 'embedded'

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>