I am using an application in the play platform in which I need to save the same instance of a non-Entity object to a JPA object without storing it in the database, I want to know if this can be achieved or not use annotations. An example of the code I'm looking for is:
public class anEntity extends Model {
@ManyToOne
public User user;
@ManyToOne
public Question question;
@Column(columnDefinition = "text")
public BigInteger candidateName;
TestObject p= new TestObject();
I tried the @Embedded annotation, but suggested that it embeds the fields of an object in an entity table. Do I need to use @Embedded when saving an object column in an entity table?
source
share