public override void ReloadReferences() { // Do not reload references if the current object has been deleted. // TODO: enable when MemoryContext uses MemoryDataObjects //if (this.ObjectState == DataObjectState.Deleted) return; base.ReloadReferences(); // fix direct object references if (_fk_guid_Group.HasValue) { GroupImpl = (Zetbox.App.Base.GroupMemoryImpl)Context.FindPersistenceObject <Zetbox.App.Base.Group>(_fk_guid_Group.Value); } else if (_fk_Group.HasValue) { GroupImpl = (Zetbox.App.Base.GroupMemoryImpl)Context.Find <Zetbox.App.Base.Group>(_fk_Group.Value); } else { GroupImpl = null; } }
public override void ReloadReferences() { // Do not reload references if the current object has been deleted. // TODO: enable when MemoryContext uses MemoryDataObjects //if (this.ObjectState == DataObjectState.Deleted) return; base.ReloadReferences(); // fix direct object references if (_fk_guid_Group.HasValue) GroupImpl = (Zetbox.App.Base.GroupMemoryImpl)Context.FindPersistenceObject<Zetbox.App.Base.Group>(_fk_guid_Group.Value); else if (_fk_Group.HasValue) GroupImpl = (Zetbox.App.Base.GroupMemoryImpl)Context.Find<Zetbox.App.Base.Group>(_fk_Group.Value); else GroupImpl = null; }