/// <summary> setups the sync logic for member _racunGlava</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncRacunGlava(IEntityCore relatedEntity)
 {
     if (_racunGlava != relatedEntity)
     {
         DesetupSyncRacunGlava(true, true);
         _racunGlava = (RacunGlavaEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_racunGlava, new PropertyChangedEventHandler(OnRacunGlavaPropertyChanged), "RacunGlava", NinjaSoftware.EnioNg.CoolJ.RelationClasses.StaticRacunStavkaRelations.RacunGlavaEntityUsingRacunGlavaIdStatic, true, new string[] {  });
     }
 }
 protected RacunStavkaEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _artikl = (ArtiklEntity)info.GetValue("_artikl", typeof(ArtiklEntity));
         if (_artikl != null)
         {
             _artikl.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _racunGlava = (RacunGlavaEntity)info.GetValue("_racunGlava", typeof(RacunGlavaEntity));
         if (_racunGlava != null)
         {
             _racunGlava.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary> Removes the sync logic for member _racunGlava</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncRacunGlava(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_racunGlava, new PropertyChangedEventHandler(OnRacunGlavaPropertyChanged), "RacunGlava", NinjaSoftware.EnioNg.CoolJ.RelationClasses.StaticRacunStavkaRelations.RacunGlavaEntityUsingRacunGlavaIdStatic, true, signalRelatedEntity, "RacunStavkaCollection", resetFKFields, new int[] { (int)RacunStavkaFieldIndex.RacunGlavaId });
     _racunGlava = null;
 }