// Basically the policies should be the same, but we also allow deferred with attribute for CMP2 (courser grained).
if (getDescriptor().getObjectChangePolicy().getClass().equals(DeferredChangeDetectionPolicy.class)) {
getReferenceDescriptor().setObjectChangePolicy(new DeferredChangeDetectionPolicy());
} else if (getDescriptor().getObjectChangePolicy().getClass().equals(ObjectChangeTrackingPolicy.class)
&& getReferenceDescriptor().getObjectChangePolicy().getClass().equals(AttributeChangeTrackingPolicy.class)) {
getReferenceDescriptor().setObjectChangePolicy(new ObjectChangeTrackingPolicy());
}
//need to set the primary key classification as the mappings for the pk fields might not be available
if (getReferenceDescriptor().isAggregateDescriptor()){
getReferenceDescriptor().getObjectBuilder().setPrimaryKeyClassifications(this.getDescriptor().getObjectBuilder().getPrimaryKeyClassifications());