&& !model.getIdProperty().equals("id")) {
association.setPrimaryKey(model.getIdProperty());
}
else if (type == ModelAssociationType.BELONGS_TO
|| type == ModelAssociationType.HAS_ONE) {
Model associationModelAnnotation = associationClass
.getAnnotation(Model.class);
if (associationModelAnnotation != null
&& StringUtils.hasText(associationModelAnnotation.idProperty())
&& !associationModelAnnotation.idProperty().equals("id")) {
association.setPrimaryKey(associationModelAnnotation.idProperty());
}
ReflectionUtils.doWithFields(associationClass, new FieldCallback() {
@Override
public void doWith(Field field) throws IllegalArgumentException,