Special handling in ContactManager for addresses
Addresses sent from core applications require
special handling in ContactManager to handle scenarios like swapping
a primary address for a secondary address. Turning address data into
XML does not require any special handling, so addresses being sent to
core applications use the normal ContactMapper
code. For these reasons, the following foreign key and array references
are defined as one-way, from ContactManager to the core application:
fkMapping(ABContact#PrimaryAddress)
.withMappingDirection(TO_XML),
arrayMapping(ABContact#ContactAddresses)
.withMappingDirection(TO_XML),
When a change to a primary or secondary address for a contact comes in from a core application, ContactManager calls ABUpdateBeanPopulator.populateAddresses instead of the regular mapping code.
While the address foreign key and array reference require special handling, the fields of an address do not. You can add or delete address fields as needed by using the fieldMapping method.
