Home > Enterprise >  How to turn an object properties into coulmns in spring jpa
How to turn an object properties into coulmns in spring jpa

Time:12-17

So I have an entity class where one of its properties is another object. How can I make spring jpa turn that class's properties into columns just like the properties of my entity class?

I have tried to make that object's class into an entity but didn't know how I can include it in my first class.

CodePudding user response:

You can use: @Embeddable and @Embedded. Use this link for more details.

CodePudding user response:

if class MsgDetail has a field: Msg, then add @Entity and @Table on Msg.

  • Related