Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs	(revision 15411)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs	(revision 15411)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2017 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.Collections.Generic;
+using System.Data.Linq;
+using System.Linq;
+
+namespace HeuristicLab.Services.Hive.DataAccess.Daos {
+  public class AssignedProjectResourceDao : GenericDao<Guid, AssignedProjectResource> {
+    public AssignedProjectResourceDao(DataContext dataContext) : base(dataContext) { }
+
+    public override AssignedProjectResource GetById(Guid id) {
+      throw new NotImplementedException();
+    }
+
+    public IQueryable<AssignedProjectResource> GetByProjectId(Guid projectId) {
+      return Table.Where(x => x.ProjectId == projectId);
+    }
+
+    public void DeleteByProjectAndGrantedUserId(Guid projectId, IEnumerable<Guid> resourceIds) {
+      string paramIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x)));
+      if (!string.IsNullOrWhiteSpace(paramIds)) {
+        string query = string.Format(DeleteByGrantedUserQuery, projectId, paramIds);
+        DataContext.ExecuteCommand(query);
+      }
+    }
+
+    #region Compiled queries
+    private static readonly Func<DataContext, Guid, IEnumerable<AssignedProjectResource>> GetByProjectIdGetByIdQuery =
+      CompiledQuery.Compile((DataContext db, Guid projectId) =>
+        from projectPermission in db.GetTable<AssignedProjectResource>()
+        where projectPermission.ProjectId == projectId
+        select projectPermission);
+    #endregion
+
+    #region String queries
+    private const string DeleteByGrantedUserQuery =
+      @"DELETE FROM [AssignedProjectResource]
+         WHERE ProjectId = '{0}'
+           AND ResourceId IN ({1});";
+    #endregion
+  }
+}
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedResourceDao.cs	(revision 15399)
+++ 	(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 AssignedResourceDao : GenericDao<Guid, AssignedResource> {
-    public AssignedResourceDao(DataContext dataContext) : base(dataContext) { }
-
-    public override AssignedResource GetById(Guid id) {
-      throw new NotImplementedException();
-    }
-
-    public IQueryable<AssignedResource> 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 AssignedResources ar ON pr.ResourceId = ar.ResourceId
-      WHERE ar.TaskId = {1}
-    ";
-    #endregion
-  }
-}
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs	(revision 15411)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedTaskResourceDao.cs	(revision 15411)
@@ -0,0 +1,58 @@
+﻿#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 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs	(revision 15411)
@@ -27,6 +27,6 @@
 namespace HeuristicLab.Services.Hive.DataAccess.Daos {
   public class TaskDao : GenericDao<Guid, Task> {
-    private Table<AssignedResource> AssignedResourceTable {
-      get { return DataContext.GetTable<AssignedResource>(); }
+    private Table<AssignedTaskResource> AssignedTaskResourceTable {
+      get { return DataContext.GetTable<AssignedTaskResource>(); }
     }
 
@@ -65,5 +65,5 @@
     /// <returns></returns>
     public IEnumerable<Task> GetParentTasks(IEnumerable<Guid> resourceIds, int count, bool finished) {
-      var query = from ar in AssignedResourceTable
+      var query = from ar in AssignedTaskResourceTable
                   where resourceIds.Contains(ar.ResourceId)
                      && ar.Task.State == TaskState.Waiting
@@ -106,5 +106,5 @@
       )
       SELECT DISTINCT t.TaskId, t.JobId, t.Priority
-      FROM pr JOIN AssignedResources ar ON ar.ResourceId = pr.ResourceId
+      FROM pr JOIN AssignedTaskResources ar ON ar.ResourceId = pr.ResourceId
           JOIN Task t ON t.TaskId = ar.TaskId
       WHERE NOT (t.IsParentTask = 1 AND t.FinishWhenChildJobsFinished = 1)
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 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 15411)
@@ -104,5 +104,6 @@
   <ItemGroup>
     <None Include="Plugin.cs.frame" />
-    <Compile Include="Daos\AssignedResourceDao.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 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 15411)
@@ -1,5 +1,5 @@
 ﻿<?xml version="1.0" encoding="utf-8"?><Database Name="HeuristicLab.Hive" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
-  <Table Name="dbo.AssignedResource" Member="AssignedResources">
-    <Type Name="AssignedResource">
+  <Table Name="dbo.AssignedProjectResource" Member="AssignedProjectResources">
+    <Type Name="AssignedProjectResource">
       <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
       <Column Name="ProjectId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
@@ -37,9 +37,10 @@
       <Column Name="HbInterval" Type="System.Int32" DbType="Int" CanBeNull="false" />
       <Column Name="OwnerUserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Association Name="Resource_AssignedResource" Member="AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedResource" />
+      <Association Name="Resource_AssignedResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedProjectResource" />
       <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" />
       <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_ResourcePermission" Member="ResourcePermissions" ThisKey="ResourceId" OtherKey="ResourceId" Type="ResourcePermission" />
+      <Association Name="Resource_AssignedTaskResource" Member="AssignedTaskResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedTaskResource" />
       <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
       <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true">
@@ -79,4 +80,5 @@
       <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" />
@@ -266,5 +268,5 @@
       <Column Name="StartDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
       <Column Name="EndDate" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
-      <Association Name="Project_AssignedResource" Member="AssignedResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedResource" />
+      <Association Name="Project_AssignedResource" Member="AssignedProjectResources" Storage="_AssignedResources" ThisKey="ProjectId" OtherKey="ProjectId" Type="AssignedProjectResource" />
       <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" />
       <Association Name="Project_Project" Member="ChildProjects" Storage="_Projects" ThisKey="ProjectId" OtherKey="ParentProjectId" Type="Project" />
@@ -281,3 +283,11 @@
     </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>
 </Database>
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15411)
@@ -4,5 +4,5 @@
   <nestedChildShapes>
     <classShape Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" absoluteBounds="13.875, 8.25, 2, 1.1939925130208327">
-      <DataClassMoniker Name="/HiveDataContext/AssignedResource" />
+      <DataClassMoniker Name="/HiveDataContext/AssignedProjectResource" />
       <nestedChildShapes>
         <elementListCompartment Id="8b005775-f0ee-41b0-ae10-6d1151003708" absoluteBounds="13.89, 8.71, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
@@ -95,5 +95,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
       <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" />
       <nodes>
@@ -313,4 +313,24 @@
       </nodes>
     </associationConnector>
+    <classShape Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" absoluteBounds="8.875, 4.375, 2, 1.1939925130208327">
+      <DataClassMoniker Name="/HiveDataContext/AssignedTaskResource" />
+      <nestedChildShapes>
+        <elementListCompartment Id="e9acd881-ab35-401c-b4f8-03dafc98422e" absoluteBounds="8.89, 4.835, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <associationConnector edgePoints="[(8.5 : 4.1170068359375); (8.875 : 4.375)]" 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 : 3.8125); (11.1875 : 3.8125); (11.1875 : 4.97199625651042); (10.875 : 4.97199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedTaskResource" />
+      <nodes>
+        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
+        <classShapeMoniker Id="72ac5c1b-0fdf-43a1-bbe7-3774893b40af" />
+      </nodes>
+    </associationConnector>
   </nestedChildShapes>
 </ordesignerObjectsDiagram>
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15411)
@@ -31,7 +31,7 @@
     #region Extensibility Method Definitions
     partial void OnCreated();
-    partial void InsertAssignedResource(AssignedResource instance);
-    partial void UpdateAssignedResource(AssignedResource instance);
-    partial void DeleteAssignedResource(AssignedResource instance);
+    partial void InsertAssignedProjectResource(AssignedProjectResource instance);
+    partial void UpdateAssignedProjectResource(AssignedProjectResource instance);
+    partial void DeleteAssignedProjectResource(AssignedProjectResource instance);
     partial void InsertPlugin(Plugin instance);
     partial void UpdatePlugin(Plugin instance);
@@ -97,4 +97,7 @@
     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);
     #endregion
 		
@@ -123,9 +126,9 @@
 		}
 		
-		public System.Data.Linq.Table<AssignedResource> AssignedResources
-		{
-			get
-			{
-				return this.GetTable<AssignedResource>();
+		public System.Data.Linq.Table<AssignedProjectResource> AssignedProjectResources
+		{
+			get
+			{
+				return this.GetTable<AssignedProjectResource>();
 			}
 		}
@@ -296,10 +299,18 @@
 			{
 				return this.GetTable<ProjectPermission>();
+			}
+		}
+		
+		public System.Data.Linq.Table<AssignedTaskResource> AssignedTaskResources
+		{
+			get
+			{
+				return this.GetTable<AssignedTaskResource>();
 			}
 		}
 	}
 	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedResource")]
-	public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedProjectResource")]
+	public partial class AssignedProjectResource : INotifyPropertyChanging, INotifyPropertyChanged
 	{
 		
@@ -324,5 +335,5 @@
     #endregion
 		
-		public AssignedResource()
+		public AssignedProjectResource()
 		{
 			this._Resource = default(EntityRef<Resource>);
@@ -379,5 +390,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Resource Resource
 		{
@@ -396,10 +407,10 @@
 					{
 						this._Resource.Entity = null;
-						previousValue.AssignedResources.Remove(this);
+						previousValue.AssignedProjectResources.Remove(this);
 					}
 					this._Resource.Entity = value;
 					if ((value != null))
 					{
-						value.AssignedResources.Add(this);
+						value.AssignedProjectResources.Add(this);
 						this._ResourceId = value.ResourceId;
 					}
@@ -413,5 +424,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedResource", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Project Project
 		{
@@ -430,10 +441,10 @@
 					{
 						this._Project.Entity = null;
-						previousValue.AssignedResources.Remove(this);
+						previousValue.AssignedProjectResources.Remove(this);
 					}
 					this._Project.Entity = value;
 					if ((value != null))
 					{
-						value.AssignedResources.Add(this);
+						value.AssignedProjectResources.Add(this);
 						this._JobId = value.ProjectId;
 					}
@@ -919,5 +930,5 @@
 		private System.Nullable<System.Guid> _OwnerUserId;
 		
-		private EntitySet<AssignedResource> _AssignedResources;
+		private EntitySet<AssignedProjectResource> _AssignedResources;
 		
 		private EntitySet<Resource> _ChildResources;
@@ -928,4 +939,6 @@
 		
 		private EntitySet<ResourcePermission> _ResourcePermissions;
+		
+		private EntitySet<AssignedTaskResource> _AssignedTaskResources;
 		
 		private EntityRef<Resource> _ParentResource;
@@ -951,9 +964,10 @@
 		public Resource()
 		{
-			this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
+			this._AssignedResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));
 			this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources));
 			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._ResourcePermissions = new EntitySet<ResourcePermission>(new Action<ResourcePermission>(this.attach_ResourcePermissions), new Action<ResourcePermission>(this.detach_ResourcePermissions));
+			this._AssignedTaskResources = new EntitySet<AssignedTaskResource>(new Action<AssignedTaskResource>(this.attach_AssignedTaskResources), new Action<AssignedTaskResource>(this.detach_AssignedTaskResources));
 			this._ParentResource = default(EntityRef<Resource>);
 			OnCreated();
@@ -1084,6 +1098,6 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
-		public EntitySet<AssignedResource> AssignedResources
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
+		public EntitySet<AssignedProjectResource> AssignedProjectResources
 		{
 			get
@@ -1146,4 +1160,17 @@
 			{
 				this._ResourcePermissions.Assign(value);
+			}
+		}
+		
+		[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);
 			}
 		}
@@ -1203,5 +1230,5 @@
 		}
 		
-		private void attach_AssignedResources(AssignedResource entity)
+		private void attach_AssignedResources(AssignedProjectResource entity)
 		{
 			this.SendPropertyChanging();
@@ -1209,5 +1236,5 @@
 		}
 		
-		private void detach_AssignedResources(AssignedResource entity)
+		private void detach_AssignedResources(AssignedProjectResource entity)
 		{
 			this.SendPropertyChanging();
@@ -1258,4 +1285,16 @@
 		
 		private void detach_ResourcePermissions(ResourcePermission 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();
@@ -1644,4 +1683,6 @@
 		private EntitySet<StateLog> _StateLogs;
 		
+		private EntitySet<AssignedTaskResource> _AssignedTaskResources;
+		
 		private EntityRef<Task> _Job1;
 		
@@ -1684,4 +1725,5 @@
 			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>);
@@ -2005,4 +2047,17 @@
 		}
 		
+		[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
@@ -2124,4 +2179,16 @@
 		
 		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();
@@ -5683,5 +5750,5 @@
 		private System.Nullable<System.DateTime> _EndDate;
 		
-		private EntitySet<AssignedResource> _AssignedResources;
+		private EntitySet<AssignedProjectResource> _AssignedResources;
 		
 		private EntitySet<Job> _Jobs;
@@ -5717,5 +5784,5 @@
 		public Project()
 		{
-			this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
+			this._AssignedResources = new EntitySet<AssignedProjectResource>(new Action<AssignedProjectResource>(this.attach_AssignedResources), new Action<AssignedProjectResource>(this.detach_AssignedResources));
 			this._Jobs = new EntitySet<Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));
 			this._Projects = new EntitySet<Project>(new Action<Project>(this.attach_Projects), new Action<Project>(this.detach_Projects));
@@ -5889,6 +5956,6 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
-		public EntitySet<AssignedResource> AssignedResources
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
+		public EntitySet<AssignedProjectResource> AssignedProjectResources
 		{
 			get
@@ -5995,5 +6062,5 @@
 		}
 		
-		private void attach_AssignedResources(AssignedResource entity)
+		private void attach_AssignedResources(AssignedProjectResource entity)
 		{
 			this.SendPropertyChanging();
@@ -6001,5 +6068,5 @@
 		}
 		
-		private void detach_AssignedResources(AssignedResource entity)
+		private void detach_AssignedResources(AssignedProjectResource entity)
 		{
 			this.SendPropertyChanging();
@@ -6194,4 +6261,172 @@
 		}
 	}
+	
+	[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");
+				}
+			}
+		}
+		
+		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));
+			}
+		}
+	}
 }
 #pragma warning restore 1591
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs	(revision 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IPersistenceManager.cs	(revision 15411)
@@ -31,5 +31,6 @@
 
     #region Hive daos
-    AssignedResourceDao AssignedResourceDao { get; }
+    AssignedTaskResourceDao AssignedTaskResourceDao { get; }
+    AssignedProjectResourceDao AssignedProjectResourceDao { get; }
     DowntimeDao DowntimeDao { get; }
     JobDao JobDao { 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 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs	(revision 15411)
@@ -38,7 +38,12 @@
     #region Hive daos
 
-    private AssignedResourceDao assignedResourceDao;
-    public AssignedResourceDao AssignedResourceDao {
-      get { return assignedResourceDao ?? (assignedResourceDao = new AssignedResourceDao(dataContext)); }
+    private AssignedTaskResourceDao assignedTaskResourceDao;
+    public AssignedTaskResourceDao AssignedTaskResourceDao {
+      get { return assignedTaskResourceDao ?? (assignedTaskResourceDao = new AssignedTaskResourceDao(dataContext)); }
+    }
+
+    private AssignedProjectResourceDao assignedProjectResourceDao;
+    public AssignedProjectResourceDao AssignedProjectResourceDao {
+      get { return assignedProjectResourceDao ?? (assignedProjectResourceDao = new AssignedProjectResourceDao(dataContext)); }
     }
 
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 15411)
@@ -26,8 +26,13 @@
 SET ARITHABORT ON
 
-CREATE TABLE [dbo].[AssignedResource](
+CREATE TABLE [dbo].[AssignedProjectResource](
   [ResourceId] UniqueIdentifier NOT NULL,
   [ProjectId] UniqueIdentifier NOT NULL,
   CONSTRAINT [PK_dbo.ResourceIdProjectId] PRIMARY KEY ([ResourceId], [ProjectId])
+  )
+CREATE TABLE [dbo].[AssignedTaskResource](
+  [ResourceId] UniqueIdentifier NOT NULL,
+  [TaskId] UniqueIdentifier NOT NULL,
+  CONSTRAINT [PK_dbo.ResourceIdTaskId] PRIMARY KEY ([ResourceId], [TaskId])
   )
 CREATE TABLE [dbo].[Plugin](
@@ -168,8 +173,12 @@
   )
 
-ALTER TABLE [dbo].[AssignedResource]
-  ADD CONSTRAINT [Resource_AssignedResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId])
-ALTER TABLE [dbo].[AssignedResource]
-  ADD CONSTRAINT [Project_AssignedResource] FOREIGN KEY ([ProjectId]) REFERENCES [dbo].[Project]([ProjectId])
+ALTER TABLE [dbo].[AssignedProjectResource]
+  ADD CONSTRAINT [Resource_AssignedProjectResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId])
+ALTER TABLE [dbo].[AssignedProjectResource]
+  ADD CONSTRAINT [Project_AssignedProjectResource] FOREIGN KEY ([ProjectId]) REFERENCES [dbo].[Project]([ProjectId])
+ALTER TABLE [dbo].[AssignedTaskResource]
+  ADD CONSTRAINT [Resource_AssignedTaskResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId])
+ALTER TABLE [dbo].[AssignedTaskResource]
+  ADD CONSTRAINT [Task_AssignedTaskResource] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId])
 ALTER TABLE [dbo].[RequiredPlugins]
   ADD CONSTRAINT [Plugin_RequiredPlugin] FOREIGN KEY ([PluginId]) REFERENCES [dbo].[Plugin]([PluginId])
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql	(revision 15399)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql	(revision 15411)
@@ -21,12 +21,25 @@
 USE [HeuristicLab.Hive-3.3]
 
-ALTER TABLE [dbo].[AssignedResource]  DROP  CONSTRAINT [Project_AssignedResource]
-ALTER TABLE [dbo].[AssignedResource]  WITH CHECK ADD  CONSTRAINT [Project_AssignedResource] FOREIGN KEY([ProjectId])
+ALTER TABLE [dbo].[AssignedProjectResource]  DROP  CONSTRAINT [Project_AssignedProjectResource]
+ALTER TABLE [dbo].[AssignedProjectResource]  WITH CHECK ADD  CONSTRAINT [Project_AssignedProjectResource] FOREIGN KEY([ProjectId])
 REFERENCES [dbo].[Project] ([ProjectId])
 ON UPDATE CASCADE
 ON DELETE CASCADE
 GO
-ALTER TABLE [dbo].[AssignedResource]  DROP  CONSTRAINT [Resource_AssignedResource]
-ALTER TABLE [dbo].[AssignedResource]  WITH CHECK ADD  CONSTRAINT [Resource_AssignedResource] FOREIGN KEY([ResourceId])
+ALTER TABLE [dbo].[AssignedProjectResource]  DROP  CONSTRAINT [Resource_AssignedProjectResource]
+ALTER TABLE [dbo].[AssignedProjectResource]  WITH CHECK ADD  CONSTRAINT [Resource_AssignedProjectResource] FOREIGN KEY([ResourceId])
+REFERENCES [dbo].[Resource] ([ResourceId])
+ON UPDATE CASCADE
+ON DELETE CASCADE
+GO
+
+ALTER TABLE [dbo].[AssignedTaskResource]  DROP  CONSTRAINT [Task_AssignedTaskResource]
+ALTER TABLE [dbo].[AssignedTaskResource]  WITH CHECK ADD  CONSTRAINT [Task_AssignedTaskResource] FOREIGN KEY([TaskId])
+REFERENCES [dbo].[Task] ([TaskId])
+ON UPDATE CASCADE
+ON DELETE CASCADE
+GO
+ALTER TABLE [dbo].[AssignedTaskResource]  DROP  CONSTRAINT [Resource_AssignedTaskResource]
+ALTER TABLE [dbo].[AssignedTaskResource]  WITH CHECK ADD  CONSTRAINT [Resource_AssignedTaskResource] FOREIGN KEY([ResourceId])
 REFERENCES [dbo].[Resource] ([ResourceId])
 ON UPDATE CASCADE
