Hi,
I am impressed with Spring Data – JPA and I started to replace our application DAL to Spring Data. While migrating I am facing couple of issues and need an expert advice.
Query 1: Our operational entities have auditable columns and it is named as CREATED_BY_USER_ID, LAST_UPDATED_BY_USER_ID, CREATED_DTTM, LAST_UPDATED_DTTM. I tried the following annotation at entity level but it is not helped.
Query 2: How to change/override the primary key value generation strategy. I am looking to change the generate value strategy as UUID for my application.Code:@AttributeOverrides({ @AttributeOverride(name="createdBy", column=@Column(name="CREATED_BY_USER_ID")), @AttributeOverride(name="lastModifiedBy", column=@Column(name="LAST_UPDATED_BY_USER_ID")), @AttributeOverride(name="createdDate", column=@Column(name="CREATED_DTTM")), @AttributeOverride(name="lastModifiedDate", column=@Column(name="LAST_UPDATED_DTTM")) }) public class ExtendedAbstractAuditable<U, PK extends Serializable> extends AbstractAuditable<U, PK> { … }


Reply With Quote
Wrote a custom AbstractAuditable class.. thats all...