非エンティティ オブジェクトの同じインスタンスをデータベースに永続化せずに JPA エンティティに格納する必要があるプレイ フレームワークでアプリケーションを実行しています。それを達成できるかどうか、またはアノテーションを使用しないかどうかを知りたいです。私が探しているもののサンプルコードは次のとおりです。
public class anEntity extends Model {
@ManyToOne
public User user;
@ManyToOne
public Question question;
//Encrypted candidate name for the answer
@Column(columnDefinition = "text")
public BigInteger candidateName;
//I want that field not to be inserted into the database
TestObject p= new TestObject();
@Embedded アノテーションを試しましたが、オブジェクト フィールドをエンティティ テーブルに埋め込むことになっています。オブジェクト列をエンティティテーブルに隠したまま@Embeddedを使用する方法はありますか?