Index: anches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs	(revision 15643)
+++ 	(revision )
@@ -1,58 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Data.Linq;
-using System.Linq;
-
-namespace HeuristicLab.Services.Hive.DataAccess.Daos {
-  public class AssignedTaskResourceDao : GenericDao<Guid, AssignedTaskResource> {
-    public AssignedTaskResourceDao(DataContext dataContext) : base(dataContext) { }
-
-    public override AssignedTaskResource GetById(Guid id) {
-      throw new NotImplementedException();
-    }
-
-    public IQueryable<AssignedTaskResource> GetByTaskId(Guid taskId) {
-      return Table.Where(x => x.TaskId == taskId);
-    }
-
-    public bool TaskIsAllowedToBeCalculatedBySlave(Guid taskId, Guid slaveId) {
-      return DataContext.ExecuteQuery<int>(TaskIsAllowedToBeCalculatedBySlaveQueryString, slaveId, taskId).First() > 0;
-    }
-
-    #region String queries
-    private const string TaskIsAllowedToBeCalculatedBySlaveQueryString = @"
-      WITH pr AS (
-        SELECT ResourceId, ParentResourceId
-        FROM [Resource]
-        WHERE ResourceId = {0}
-        UNION ALL
-        SELECT r.ResourceId, r.ParentResourceId
-        FROM [Resource] r JOIN pr ON r.ResourceId = pr.ParentResourceId
-      )
-      SELECT COUNT(ar.TaskId)
-      FROM pr JOIN AssignedTaskResources ar ON pr.ResourceId = ar.ResourceId
-      WHERE ar.TaskId = {1}
-    ";
-    #endregion
-  }
-}
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs	(revision 15644)
@@ -27,8 +27,4 @@
 namespace HeuristicLab.Services.Hive.DataAccess.Daos {
   public class TaskDao : GenericDao<Guid, Task> {
-    private Table<AssignedTaskResource> AssignedTaskResourceTable {
-      get { return DataContext.GetTable<AssignedTaskResource>(); }
-    }
-
     public TaskDao(DataContext dataContext) : base(dataContext) { }
 
@@ -59,30 +55,4 @@
         slave.FreeCores, 
         slave.FreeMemory).ToList();
-    }
-
-    /// <summary>
-    /// returns all parent tasks which are waiting for their child tasks to finish
-    /// </summary>
-    /// <param name="resourceIds">list of resourceids which for which the task should be valid</param>
-    /// <param name="count">maximum number of task to return</param>
-    /// <param name="finished">if true, all parent task which have FinishWhenChildJobsFinished=true are returned, otherwise only FinishWhenChildJobsFinished=false are returned</param>
-    /// <returns></returns>
-    public IEnumerable<Task> GetParentTasks_Old(IEnumerable<Guid> resourceIds, int count, bool finished) {
-      var query = from ar in AssignedTaskResourceTable
-                  where resourceIds.Contains(ar.ResourceId)
-                     && ar.Task.State == TaskState.Waiting
-                     && ar.Task.IsParentTask
-                     && (finished ? ar.Task.FinishWhenChildJobsFinished : !ar.Task.FinishWhenChildJobsFinished)
-                     && (from child in Table
-                         where child.ParentTaskId == ar.Task.TaskId
-                         select child.State == TaskState.Finished
-                             || child.State == TaskState.Aborted
-                             || child.State == TaskState.Failed).All(x => x)
-                     && (from child in Table // avoid returning WaitForChildTasks task where no child-task exist (yet)
-                         where child.ParentTaskId == ar.Task.TaskId
-                         select child).Any()
-                  orderby ar.Task.Priority descending
-                  select ar.Task;
-      return count == 0 ? query.ToArray() : query.Take(count).ToArray();
     }
 
@@ -153,21 +123,4 @@
       AND ajr.ResourceId = rbranch.ResourceId
     ";
-    private const string GetWaitingTasksQueryStringOld = @"
-      WITH pr AS (
-        SELECT ResourceId, ParentResourceId
-        FROM [Resource]
-        WHERE ResourceId = {0}
-        UNION ALL
-        SELECT r.ResourceId, r.ParentResourceId
-        FROM [Resource] r JOIN pr ON r.ResourceId = pr.ParentResourceId
-      )
-      SELECT DISTINCT t.TaskId, t.JobId, t.Priority
-      FROM pr JOIN AssignedTaskResource ar ON ar.ResourceId = pr.ResourceId
-          JOIN Task t ON t.TaskId = ar.TaskId
-      WHERE NOT (t.IsParentTask = 1 AND t.FinishWhenChildJobsFinished = 1)
-          AND t.TaskState = {1}
-          AND t.CoresNeeded <= {2}
-          AND t.MemoryNeeded <= {3}
-    ";
 
     private const string UpdateExecutionTimeQuery = @"
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 15644)
@@ -106,5 +106,4 @@
     <Compile Include="Daos\AssignedJobResourceDao.cs" />
     <Compile Include="Daos\AssignedProjectResourceDao.cs" />
-    <Compile Include="Daos\AssignedTaskResourceDao.cs" />
     <Compile Include="Daos\DowntimeDao.cs" />
     <Compile Include="Daos\GenericDao.cs" />
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 15644)
@@ -41,5 +41,4 @@
       <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" />
       <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" />
-      <Association Name="Resource_AssignedTaskResource" Member="AssignedTaskResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedTaskResource" />
       <Association Name="Resource_AssignedJobResource" Member="AssignedJobResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedJobResource" />
       <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
@@ -80,5 +79,4 @@
       <Association Name="Task_TaskData" Member="JobData" ThisKey="TaskId" OtherKey="TaskId" Type="TaskData" Cardinality="One" />
       <Association Name="Task_StateLog" Member="StateLogs" ThisKey="TaskId" OtherKey="TaskId" Type="StateLog" />
-      <Association Name="Task_AssignedTaskResource" Member="AssignedTaskResources" ThisKey="TaskId" OtherKey="TaskId" Type="AssignedTaskResource" />
       <Association Name="Task_Task" Member="ParentJob" Storage="_Job1" ThisKey="ParentTaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" />
       <Association Name="Job_Task" Member="Job" Storage="_HiveExperiment" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
@@ -276,12 +274,4 @@
     </Type>
   </Table>
-  <Table Name="dbo.AssignedTaskResource" Member="AssignedTaskResources">
-    <Type Name="AssignedTaskResource">
-      <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
-      <Column Name="TaskId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
-      <Association Name="Task_AssignedTaskResource" Member="Task" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" />
-      <Association Name="Resource_AssignedTaskResource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
-    </Type>
-  </Table>
   <Table Name="dbo.AssignedJobResource" Member="AssignedJobResources">
     <Type Name="AssignedJobResource">
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15644)
@@ -155,5 +155,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Task/Task_StateLog" />
       <nodes>
@@ -162,5 +162,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(6.125 : 3.37100341796875); (6.5 : 3.37100341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(6.125 : 3.37100341796875); (6.5 : 3.37100341796875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Job/Job_Task" />
       <nodes>
@@ -169,5 +169,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(4.125 : 4.20274983723958); (3.75 : 4.20274983723958)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(4.125 : 4.20274983723958); (3.75 : 4.20274983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Job/Job_JobPermission" />
       <nodes>
@@ -279,29 +279,9 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 5.15549967447917); (4.80957165625 : 5.15549967447917); (4.80957165625 : 4.78049967447917)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 5.15549967447917); (4.80957165625 : 5.15549967447917); (4.80957165625 : 4.78049967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
       <nodes>
         <classShapeMoniker Id="30778876-b5f6-4a97-9ec7-792011973d75" />
         <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" />
-      </nodes>
-    </associationConnector>
-    <classShape Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" absoluteBounds="11.25, 4.5, 2, 1.1939925130208327">
-      <DataClassMoniker Name="/HiveDataContext/AssignedTaskResource" />
-      <nestedChildShapes>
-        <elementListCompartment Id="e9acd881-ab35-401c-b4f8-03dafc98422e" absoluteBounds="11.265, 4.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
-      </nestedChildShapes>
-    </classShape>
-    <associationConnector edgePoints="[(8.031252 : 4.1170068359375); (8.031252 : 4.4375); (11.15625 : 4.4375); (11.15625 : 5.09699625651042); (11.25 : 5.09699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/HiveDataContext/Task/Task_AssignedTaskResource" />
-      <nodes>
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-        <classShapeMoniker Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 4.5)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedTaskResource" />
-      <nodes>
-        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
-        <classShapeMoniker Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" />
       </nodes>
     </associationConnector>
@@ -326,5 +306,5 @@
       </nestedChildShapes>
     </classShape>
-    <associationConnector edgePoints="[(11.718748 : 2.9631982421875); (11.718748 : 4.375); (11.0625 : 4.375); (11.0625 : 4.79849862825521); (10.875 : 4.79849862825521)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 5.09699625651042); (10.875 : 5.09699625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
       <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedJobResource" />
       <nodes>
@@ -333,5 +313,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(5.498537828125 : 4.78049967447917); (5.498537828125 : 5.14024983723958); (7.41666666666667 : 5.14024983723958 : JumpStart); (7.58333333333333 : 5.14024983723958 : JumpEnd); (8.875 : 5.14024983723958)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(5.498537828125 : 4.78049967447917); (5.498537828125 : 5.14024983723958); (7.41666666666667 : 5.14024983723958 : JumpStart); (7.58333333333333 : 5.14024983723958 : JumpEnd); (8.875 : 5.14024983723958)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedJobResource" />
       <nodes>
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15644)
@@ -94,7 +94,4 @@
     partial void UpdateProjectPermission(ProjectPermission instance);
     partial void DeleteProjectPermission(ProjectPermission instance);
-    partial void InsertAssignedTaskResource(AssignedTaskResource instance);
-    partial void UpdateAssignedTaskResource(AssignedTaskResource instance);
-    partial void DeleteAssignedTaskResource(AssignedTaskResource instance);
     partial void InsertAssignedJobResource(AssignedJobResource instance);
     partial void UpdateAssignedJobResource(AssignedJobResource instance);
@@ -291,12 +288,4 @@
 			{
 				return this.GetTable<ProjectPermission>();
-			}
-		}
-		
-		public System.Data.Linq.Table<AssignedTaskResource> AssignedTaskResources
-		{
-			get
-			{
-				return this.GetTable<AssignedTaskResource>();
 			}
 		}
@@ -390,5 +379,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Resource Resource
 		{
@@ -424,5 +413,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Project Project
 		{
@@ -938,6 +927,4 @@
 		private EntitySet<StateLog> _StateLogs;
 		
-		private EntitySet<AssignedTaskResource> _AssignedTaskResources;
-		
 		private EntitySet<AssignedJobResource> _AssignedJobResources;
 		
@@ -968,5 +955,4 @@
 			this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars));
 			this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
-			this._AssignedTaskResources = new EntitySet<AssignedTaskResource>(new Action<AssignedTaskResource>(this.attach_AssignedTaskResources), new Action<AssignedTaskResource>(this.detach_AssignedTaskResources));
 			this._AssignedJobResources = new EntitySet<AssignedJobResource>(new Action<AssignedJobResource>(this.attach_AssignedJobResources), new Action<AssignedJobResource>(this.detach_AssignedJobResources));
 			this._ParentResource = default(EntityRef<Resource>);
@@ -1098,5 +1084,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<AssignedProjectResource> AssignedProjectResources
 		{
@@ -1150,18 +1136,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedTaskResource", Storage="_AssignedTaskResources", ThisKey="ResourceId", OtherKey="ResourceId")]
-		public EntitySet<AssignedTaskResource> AssignedTaskResources
-		{
-			get
-			{
-				return this._AssignedTaskResources;
-			}
-			set
-			{
-				this._AssignedTaskResources.Assign(value);
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedJobResource", Storage="_AssignedJobResources", ThisKey="ResourceId", OtherKey="ResourceId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedJobResource", Storage="_AssignedJobResources", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<AssignedJobResource> AssignedJobResources
 		{
@@ -1273,16 +1246,4 @@
 		
 		private void detach_StateLogs(StateLog entity)
-		{
-			this.SendPropertyChanging();
-			entity.Resource = null;
-		}
-		
-		private void attach_AssignedTaskResources(AssignedTaskResource entity)
-		{
-			this.SendPropertyChanging();
-			entity.Resource = this;
-		}
-		
-		private void detach_AssignedTaskResources(AssignedTaskResource entity)
 		{
 			this.SendPropertyChanging();
@@ -1683,6 +1644,4 @@
 		private EntitySet<StateLog> _StateLogs;
 		
-		private EntitySet<AssignedTaskResource> _AssignedTaskResources;
-		
 		private EntityRef<Task> _Job1;
 		
@@ -1725,5 +1684,4 @@
 			this._JobData = default(EntityRef<TaskData>);
 			this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs));
-			this._AssignedTaskResources = new EntitySet<AssignedTaskResource>(new Action<AssignedTaskResource>(this.attach_AssignedTaskResources), new Action<AssignedTaskResource>(this.detach_AssignedTaskResources));
 			this._Job1 = default(EntityRef<Task>);
 			this._HiveExperiment = default(EntityRef<Job>);
@@ -2047,17 +2005,4 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedTaskResource", Storage="_AssignedTaskResources", ThisKey="TaskId", OtherKey="TaskId")]
-		public EntitySet<AssignedTaskResource> AssignedTaskResources
-		{
-			get
-			{
-				return this._AssignedTaskResources;
-			}
-			set
-			{
-				this._AssignedTaskResources.Assign(value);
-			}
-		}
-		
 		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)]
 		public Task ParentJob
@@ -2179,16 +2124,4 @@
 		
 		private void detach_StateLogs(StateLog entity)
-		{
-			this.SendPropertyChanging();
-			entity.Task = null;
-		}
-		
-		private void attach_AssignedTaskResources(AssignedTaskResource entity)
-		{
-			this.SendPropertyChanging();
-			entity.Task = this;
-		}
-		
-		private void detach_AssignedTaskResources(AssignedTaskResource entity)
 		{
 			this.SendPropertyChanging();
@@ -2669,5 +2602,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_Jobs", ThisKey="JobId", OtherKey="JobId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Task", Storage="_Jobs", ThisKey="JobId", OtherKey="JobId")]
 		public EntitySet<Task> Tasks
 		{
@@ -2682,5 +2615,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperimentPermissions", ThisKey="JobId", OtherKey="JobId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperimentPermissions", ThisKey="JobId", OtherKey="JobId")]
 		public EntitySet<JobPermission> JobPermissions
 		{
@@ -2695,5 +2628,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedJobResource", Storage="_AssignedJobResources", ThisKey="JobId", OtherKey="JobId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedJobResource", Storage="_AssignedJobResources", ThisKey="JobId", OtherKey="JobId")]
 		public EntitySet<AssignedJobResource> AssignedJobResources
 		{
@@ -3533,5 +3466,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobPermission", Storage="_HiveExperiment", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
 		public Job Job
 		{
@@ -5833,5 +5766,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
 		public EntitySet<AssignedProjectResource> AssignedProjectResources
 		{
@@ -5872,5 +5805,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_ProjectPermissions", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_ProjectPermissions", ThisKey="ProjectId", OtherKey="ProjectId")]
 		public EntitySet<ProjectPermission> ProjectPermissions
 		{
@@ -6084,5 +6017,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
 		public Project Project
 		{
@@ -6114,172 +6047,4 @@
 					}
 					this.SendPropertyChanged("Project");
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedTaskResource")]
-	public partial class AssignedTaskResource : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private System.Guid _ResourceId;
-		
-		private System.Guid _TaskId;
-		
-		private EntityRef<Task> _Task;
-		
-		private EntityRef<Resource> _Resource;
-		
-    #region Extensibility Method Definitions
-    partial void OnLoaded();
-    partial void OnValidate(System.Data.Linq.ChangeAction action);
-    partial void OnCreated();
-    partial void OnResourceIdChanging(System.Guid value);
-    partial void OnResourceIdChanged();
-    partial void OnTaskIdChanging(System.Guid value);
-    partial void OnTaskIdChanged();
-    #endregion
-		
-		public AssignedTaskResource()
-		{
-			this._Task = default(EntityRef<Task>);
-			this._Resource = default(EntityRef<Resource>);
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
-		public System.Guid ResourceId
-		{
-			get
-			{
-				return this._ResourceId;
-			}
-			set
-			{
-				if ((this._ResourceId != value))
-				{
-					if (this._Resource.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
-					this.OnResourceIdChanging(value);
-					this.SendPropertyChanging();
-					this._ResourceId = value;
-					this.SendPropertyChanged("ResourceId");
-					this.OnResourceIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
-		public System.Guid TaskId
-		{
-			get
-			{
-				return this._TaskId;
-			}
-			set
-			{
-				if ((this._TaskId != value))
-				{
-					if (this._Task.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
-					this.OnTaskIdChanging(value);
-					this.SendPropertyChanging();
-					this._TaskId = value;
-					this.SendPropertyChanged("TaskId");
-					this.OnTaskIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedTaskResource", Storage="_Task", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
-		public Task Task
-		{
-			get
-			{
-				return this._Task.Entity;
-			}
-			set
-			{
-				Task previousValue = this._Task.Entity;
-				if (((previousValue != value) 
-							|| (this._Task.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._Task.Entity = null;
-						previousValue.AssignedTaskResources.Remove(this);
-					}
-					this._Task.Entity = value;
-					if ((value != null))
-					{
-						value.AssignedTaskResources.Add(this);
-						this._TaskId = value.TaskId;
-					}
-					else
-					{
-						this._TaskId = default(System.Guid);
-					}
-					this.SendPropertyChanged("Task");
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedTaskResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
-		public Resource Resource
-		{
-			get
-			{
-				return this._Resource.Entity;
-			}
-			set
-			{
-				Resource previousValue = this._Resource.Entity;
-				if (((previousValue != value) 
-							|| (this._Resource.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._Resource.Entity = null;
-						previousValue.AssignedTaskResources.Remove(this);
-					}
-					this._Resource.Entity = value;
-					if ((value != null))
-					{
-						value.AssignedTaskResources.Add(this);
-						this._ResourceId = value.ResourceId;
-					}
-					else
-					{
-						this._ResourceId = default(System.Guid);
-					}
-					this.SendPropertyChanged("Resource");
 				}
 			}
@@ -6386,5 +6151,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedJobResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedJobResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]
 		public Resource Resource
 		{
@@ -6420,5 +6185,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedJobResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE", DeleteOnNull=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedJobResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
 		public Job Job
 		{
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs	(revision 15644)
@@ -31,5 +31,4 @@
 
     #region Hive daos
-    AssignedTaskResourceDao AssignedTaskResourceDao { get; }
     AssignedJobResourceDao AssignedJobResourceDao { get; }
     AssignedProjectResourceDao AssignedProjectResourceDao { get; }
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs	(revision 15644)
@@ -37,9 +37,4 @@
 
     #region Hive daos
-
-    private AssignedTaskResourceDao assignedTaskResourceDao;
-    public AssignedTaskResourceDao AssignedTaskResourceDao {
-      get { return assignedTaskResourceDao ?? (assignedTaskResourceDao = new AssignedTaskResourceDao(dataContext)); }
-    }
 
     private AssignedJobResourceDao assignedJobResourceDao;
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/HiveService.cs	(revision 15644)
@@ -69,36 +69,4 @@
 
     #region Task Methods
-    
-    public Guid AddTask(DT.Task task, DT.TaskData taskData, IEnumerable<Guid> resourceIds) {
-      RoleVerifier.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
-      var pm = PersistenceManager;
-      using (new PerformanceLogger("AddTask")) {
-        var taskDao = pm.TaskDao;
-        var stateLogDao = pm.StateLogDao;
-
-        var newTask = task.ToEntity();
-        newTask.JobData = taskData.ToEntity();
-        newTask.JobData.LastUpdate = DateTime.Now;
-        newTask.AssignedTaskResources.AddRange(resourceIds.Select(
-          x => new DA.AssignedTaskResource {
-            ResourceId = x
-          }));
-        newTask.State = DA.TaskState.Waiting;
-        return pm.UseTransaction(() => {
-          taskDao.Save(newTask);
-          pm.SubmitChanges();
-          stateLogDao.Save(new DA.StateLog {
-            State = DA.TaskState.Waiting,
-            DateTime = DateTime.Now,
-            TaskId = newTask.TaskId,
-            UserId = UserManager.CurrentUserId,
-            SlaveId = null,
-            Exception = null
-          });
-          pm.SubmitChanges();
-          return newTask.TaskId;
-        }, false, true);
-      }
-    }
 
     public Guid AddTask(DT.Task task, DT.TaskData taskData) {
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs	(revision 15644)
@@ -212,70 +212,4 @@
       return actions;
     }
-
-    /// <summary>
-    /// Update the progress of each task
-    /// Checks if all the task sent by heartbeat are supposed to be calculated by this slave
-    /// </summary>
-    private IEnumerable<MessageContainer> UpdateTasks_Old(IPersistenceManager pm, Heartbeat heartbeat, bool isAllowedToCalculate) {
-      var taskDao = pm.TaskDao;
-      var assignedResourceDao = pm.AssignedTaskResourceDao;
-      var actions = new List<MessageContainer>();
-      if (heartbeat.JobProgress == null || !heartbeat.JobProgress.Any())
-        return actions;
-
-      if (!isAllowedToCalculate && heartbeat.JobProgress.Count != 0) {
-        actions.Add(new MessageContainer(MessageContainer.MessageType.PauseAll));
-      } else {
-        // select all tasks and statelogs with one query
-        var taskIds = heartbeat.JobProgress.Select(x => x.Key).ToList();
-        var taskInfos = pm.UseTransaction(() =>
-          (from task in taskDao.GetAll()
-           where taskIds.Contains(task.TaskId)
-           let lastStateLog = task.StateLogs.OrderByDescending(x => x.DateTime).FirstOrDefault()
-           select new {
-             TaskId = task.TaskId,
-             Command = task.Command,
-             SlaveId = lastStateLog != null ? lastStateLog.SlaveId : default(Guid)
-           }).ToList()
-        );
-
-        // process the jobProgresses
-        foreach (var jobProgress in heartbeat.JobProgress) {
-          var progress = jobProgress;
-          var curTask = taskInfos.SingleOrDefault(x => x.TaskId == progress.Key);
-          if (curTask == null) {
-            actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, progress.Key));
-            LogFactory.GetLogger(this.GetType().Namespace).Log("Task on slave " + heartbeat.SlaveId + " does not exist in DB: " + jobProgress.Key);
-          } else {
-            var slaveId = curTask.SlaveId;
-            if (slaveId == Guid.Empty || slaveId != heartbeat.SlaveId) {
-              // assigned slave does not match heartbeat
-              actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.TaskId));
-              LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate task: " + curTask.TaskId);
-            } else if (!assignedResourceDao.TaskIsAllowedToBeCalculatedBySlave(curTask.TaskId, heartbeat.SlaveId)) {
-              // assigned resources ids of task do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group
-              actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.TaskId));
-            } else {
-              // update task execution time
-              pm.UseTransaction(() => {
-                taskDao.UpdateExecutionTime(curTask.TaskId, progress.Value.TotalMilliseconds);
-              });
-              switch (curTask.Command) {
-                case DA.Command.Stop:
-                  actions.Add(new MessageContainer(MessageContainer.MessageType.StopTask, curTask.TaskId));
-                  break;
-                case DA.Command.Pause:
-                  actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curTask.TaskId));
-                  break;
-                case DA.Command.Abort:
-                  actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curTask.TaskId));
-                  break;
-              }
-            }
-          }
-        }
-      }
-      return actions;
-    }
   }
 }
Index: /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs
===================================================================
--- /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs	(revision 15643)
+++ /branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs	(revision 15644)
@@ -31,6 +31,4 @@
   public interface IHiveService {
     #region Task Methods
-    //[OperationContract]
-    //Guid AddTask(Task task, TaskData taskData, IEnumerable<Guid> resourceIds);
 
     [OperationContract]
