why does extending @MappedSuperclass remove entity's activeRecord.aj?
I had an entity that wanted to added some common auditing fields to, so I though the best way to achieve thas was to extended a MappedSuperclass, but when I do, the activeRecord.aj of the entity is removed and the tests are all screwed up.
Here is the entity extending the MappedSuperclass:
Code:
@RooJavaBean
@RooToString
@RooJpaActiveRecord(identifierColumn = "attachment_id", identifierField = "attachmentId", identifierType = Integer.class)
public class Attachment extends PersistableObject {
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "attachment_type")
private AttachmentTypeEnum attachmentTypeEnum;
@NotNull
@Lob @Column(name = "attachment")
private byte[] attachmentByteArray;
@NotNull
@Column(name = "file_name")
private String fileName;
@NotNull
@Column(name = "mime_type")
private String mimeType;
@ManyToOne
@JoinColumn(name = "proposal_id")
private Proposal proposal;
}
Here is the MappedSuperclass:
Code:
@MappedSuperclass
public abstract class PersistableObject {
@Column(name = "added_by", length = 50)
private String addedBy;
}
All of the Attachment integration tests are broken because Roo removed the Attachment_Roo_Jpa_ActiveRecord.aj file.
Why? and how can I addthe MappedSuperclass without botching up the entity?