I am not quite sure how to get this to work. I have a primary key whose value is derived from a ManyToOne relation:
@JoinColumn(name = "job_schedule_id", referencedColumnName = "id")
private JobSchedule jobSchedule;
That is, the value of my primary key is essentially jobSchedule.getId(). Since this is an enhanced bean, I can't use a getter annotated with @Id. However, I also can't annotate the above ManyToOne with @Id. Otherwise, ebean attempts to persist the contents of JobSchedule in place of the primary key.
Any ideas? If not, I am going to attempt to turn off enhancement for this bean and use subclassing...