public virtual void MergeImport(System.Xml.XmlReader xml)
 {
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights()) return;
     switch (xml.NamespaceURI + "|" + xml.LocalName) {
     case "Zetbox.App.Base|AParent":
         this._fk_guid_AParent = XmlStreamer.ReadNullableGuid(xml);
         break;
     case "Zetbox.App.Base|BParent":
         this._fk_guid_BParent = XmlStreamer.ReadNullableGuid(xml);
         break;
     case "Zetbox.App.Base|ChangedOn":
         // Import must have default value set
         this._ChangedOn = XmlStreamer.ReadDateTime(xml);
         this._isChangedOnSet = true;
         break;
     case "Zetbox.App.Base|CreatedOn":
         // Import must have default value set
         this._CreatedOn = XmlStreamer.ReadDateTime(xml);
         this._isCreatedOnSet = true;
         break;
     case "Zetbox.App.Base|ExportGuid":
         // Import must have default value set
         this._ExportGuid = XmlStreamer.ReadGuid(xml);
         this._isExportGuidSet = true;
         break;
     case "Zetbox.App.Base|HasPersistentOrder":
         // Import must have default value set
         this._HasPersistentOrder = XmlStreamer.ReadBoolean(xml);
         this._isHasPersistentOrderSet = true;
         break;
     case "Zetbox.App.Base|Multiplicity":
         this._Multiplicity = (Zetbox.App.Base.Multiplicity)XmlStreamer.ReadNullableInt32(xml);
        break;
     case "Zetbox.App.Base|Navigator":
         this._fk_guid_Navigator = XmlStreamer.ReadNullableGuid(xml);
         break;
     case "Zetbox.App.Base|RoleName":
         this._RoleName = XmlStreamer.ReadString(xml);
         break;
     case "Zetbox.App.Base|Type":
         this._fk_guid_Type = XmlStreamer.ReadNullableGuid(xml);
         break;
     }
 }
 public override IEnumerable<IPersistenceObject> FromStream(Zetbox.API.ZetboxStreamReader binStream)
 {
     var baseResult = base.FromStream(binStream);
     var result = new List<IPersistenceObject>();
     // it may be only an empty shell to stand-in for unreadable data
     if (CurrentAccessRights != Zetbox.API.AccessRights.None) {
     this._fk_AParent = binStream.ReadNullableInt32();
     this._fk_BParent = binStream.ReadNullableInt32();
     this._fk_ChangedBy = binStream.ReadNullableInt32();
     this._isChangedOnSet = binStream.ReadBoolean();
     if (this._isChangedOnSet) {
         this._ChangedOn = binStream.ReadDateTime();
     }
     this._fk_CreatedBy = binStream.ReadNullableInt32();
     this._isCreatedOnSet = binStream.ReadBoolean();
     if (this._isCreatedOnSet) {
         this._CreatedOn = binStream.ReadDateTime();
     }
     this._isExportGuidSet = binStream.ReadBoolean();
     if (this._isExportGuidSet) {
         this._ExportGuid = binStream.ReadGuid();
     }
     this._isHasPersistentOrderSet = binStream.ReadBoolean();
     if (this._isHasPersistentOrderSet) {
         this._HasPersistentOrder = binStream.ReadBoolean();
     }
     this._Multiplicity = (Zetbox.App.Base.Multiplicity)binStream.ReadNullableInt32();
     this._fk_Navigator = binStream.ReadNullableInt32();
     this._RoleName = binStream.ReadString();
     this._fk_Type = binStream.ReadNullableInt32();
     } // if (CurrentAccessRights != Zetbox.API.AccessRights.None)
     return baseResult == null
         ? result.Count == 0
             ? null
             : result
         : baseResult.Concat(result);
 }