public void SyncToMeta(Repository repository, AssociationType associationType) { associationType.Reset(); if (!associationType.ExistId) { associationType.Id = this.id; } if (this.objectType != null) { var domain = Domain.GetDomain(associationType); var associationObjectTypeId = new Guid(this.objectType.idRef); var associationObjectType = (ObjectType)domain.Domain.Find(associationObjectTypeId); if (associationObjectType == null) { repository.AddUndefinedObjectType(this.objectType.idRef); associationObjectType = domain.AddDeclaredObjectType(associationObjectTypeId); } associationType.ObjectType = associationObjectType; } associationType.AssignedSingularName = this.singularName; associationType.AssignedPluralName = this.pluralName; if (this.isMany != null) { associationType.IsMany = bool.Parse(this.isMany); } }