new Function<AssociationDescriptor, Map<String, EntityReference>>()
{
@Override
public Map<String, EntityReference> map( AssociationDescriptor associationDescriptor )
{
NamedAssociation<?> assoc = associationState.namedAssociationFor( associationDescriptor.accessor() );
Map<String, EntityReference> refs = new LinkedHashMap<>( assoc.count() );
for( String name : assoc )
{
refs.put( name, EntityReference.entityReferenceFor( assoc.get( name ) ) );
}