I have a mapping which looks like this
Code:
@Entity
public final class AsapSession {
@Id
private Integer id;
@OrderBy(clause = "position")
@OneToMany(cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
@Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
@JoinColumn(name = "sessionId", nullable = false)
private List<AsapColumn> columns;
}
The problem I have is that I need to store a mix of AsapColumns; some of which should be persisted and a specific subclass which should not be persisted. Is there a way to mark an Entity as @Transient like you can on a field to have it not be persisted?
Thanks,
Trevor