}
@Override
public void setProperty(final ObjectAdapter targetAdapter, final ObjectAdapter associateAdapter) {
if (targetAdapter.isPersistent()) {
final IdentityData targetReference = encoder.encodeIdentityData(targetAdapter);
try {
final ObjectSpecification associatedSpec = associateAdapter.getSpecification();
if (associatedSpec.isCollection()) {
// silently ignore; shouldn't happen
} else {
ObjectData[] updates;
if (!associatedSpec.isValueOrIsAggregated()) {
final IdentityData associateReference = encoder.encodeIdentityData(associateAdapter);
final SetAssociationRequest request =
new SetAssociationRequest(getAuthenticationSession(), name, targetReference,
associateReference);
final SetAssociationResponse response = serverFacade.setAssociation(request);
updates = response.getUpdates();