In my use-case, I would like to @Embedded a class C in an entity.
Another entity refers to C with @OneToMany association and therefore C is annotated with @Entity.
I am aware that this seems like bad design, yet I believe that it makes perfect sense in my case.
Is it possible to force Hibernate to embed an Entity? If I try it, Hibernate complains about a missing setter for the id property of C.
I think the problem comes from this:
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
private Long id;