anchor.diff:    String _tableName;
   
     Map<String, VariableMirror> _propertyCache;
  +  Map<String, String> _foreignKeyCache;
   
     String foreignKeyForProperty(String propertyName) {
  -    var propertyMirror = _propertyMirrorForProperty(propertyName);
  -    if (propertyMirror == null) {
  -      return null;
  -    }
  -
  -    var attr = _relationshipAttributeForPropertyMirror(propertyMirror);
  -    if (attr == null) {
  -      return null;
  -    }
  -
  -    var suffixName = attr.referenceKey;
  -    if (suffixName == null) {
  -      var propertyTypeMirror = propertyMirror.type;
  -      if (propertyTypeMirror.isSubtypeOf(reflectType(List))) {
  -        propertyTypeMirror = propertyTypeMirror.typeArguments.first;
  -      }
  -
  -      var relatedEntity = entityForType(propertyTypeMirror.reflectedType);
  -      var relatedTypePrimaryKeyAttr = relatedEntity.entityTypeMirror.declarations.values.firstWhere((dm) {
  -        Attributes propAttrs = dm.metadata.firstWhere((im) => im.reflectee is Attributes, orElse: () => null)?.reflectee;
  -        if (propAttrs == null) {
  -          return false;
  -        }
  -        return propAttrs.isPrimaryKey;
  -      }, orElse: () => null);
  -
  -      if (relatedTypePrimaryKeyAttr == null) {
  -        var className = MirrorSystem.getName(propertyMirror.owner.simpleName);
  -        throw new QueryException(500, "Related value for $propertyName on ${className} does not have a primary key or a reference key.", -1);
  -      }
  -
  -      suffixName = MirrorSystem.getName(relatedTypePrimaryKeyAttr.simpleName);
  -    }
  -
  -    return "${propertyName}_${suffixName}";
  +    return _foreignKeyCache[propertyName];
     }
   
     RelationshipAttribute relationshipAttributeForProperty(String propertyName) {
  
positive.code:       return cachedEntity;
      }
  
      var rt = reflectClass(t);
      var modelRefl = reflectType(Model);
      var entityTypeRefl = rt;
  
  
negative.code:       return attr.reflectee.isPrimaryKey;
      });
  
      _buildForeignKeyCache();
    }
  
    void _buildForeignKeyCache() {
      _foreignKeyCache = {};
  
      _propertyCache.forEach((propertyName, variableMirror) {
        var attr = _relationshipAttributeForPropertyMirror(variableMirror);
        if (attr == null) {
          return;
        }
  
        var suffixName = attr.referenceKey;
        if (suffixName == null) {
          var propertyTypeMirror = variableMirror.type;
          if (propertyTypeMirror.isSubtypeOf(reflectType(List))) {
            propertyTypeMirror = propertyTypeMirror.typeArguments.first;
          }
  
          var relatedBackingMirror = _modelDefinitionMirror(propertyTypeMirror.reflectedType);
          var relatedTypePrimaryKeyAttr = relatedBackingMirror.declarations.values.firstWhere((dm) {
            Attributes propAttrs = dm.metadata.firstWhere((im) => im.reflectee is Attributes, orElse: () => null)?.reflectee;
            if (propAttrs == null) {
              return false;
            }
            return propAttrs.isPrimaryKey;
          }, orElse: () => null);
  
          if (relatedTypePrimaryKeyAttr == null) {
            var className = MirrorSystem.getName(variableMirror.owner.simpleName);
            throw new QueryException(500, "Related value for $propertyName on ${className} does not have a primary key or a reference key.", -1);
          }
  
          suffixName = MirrorSystem.getName(relatedTypePrimaryKeyAttr.simpleName);
        }
  
        _foreignKeyCache[propertyName] = "${propertyName}_${suffixName}";
      });
  
    }
  }