Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedJobResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedJobResourceDao.cs	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedJobResourceDao.cs	(revision 15577)
@@ -30,7 +30,15 @@
     }
 
+    public void DeleteByProjectIds(IEnumerable<Guid> projectIds) {
+      string paramProjectIds = string.Join(",", projectIds.Select(x => string.Format("'{0}'", x)));
+      if (!string.IsNullOrWhiteSpace(paramProjectIds)) {
+        string queryString = string.Format(DeleteByProjectIdsQueryString, paramProjectIds);
+        DataContext.ExecuteCommand(queryString);
+      }
+    }
+
     public void DeleteByProjectIdsAndUserIds(IEnumerable<Guid> projectIds, IEnumerable<Guid> userIds) {
       string paramProjectIds = string.Join(",", projectIds.Select(x => string.Format("'{0}'", x)));
-      string paramUserIds = string.Join(",", userIds.Select(x => string.Format("'{0}'", x)));
+      string paramUserIds = string.Join(",", userIds.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramProjectIds) && !string.IsNullOrWhiteSpace(paramUserIds)) {
         string queryString = string.Format(DeleteByProjectIdsAndUserIdsQueryString, paramProjectIds, paramUserIds);
@@ -83,25 +91,34 @@
     #region String queries
     private const string DeleteByProjectIdQueryString = @"
-      DELETE FROM [AssignedJobResource] ajr
-      WHERE ajr.JobId IN
-	      (
-		      SELECT j.JobId
-		      FROM [Job] j
-		      WHERE j.ProjectId = {0}
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
+	      (
+		      SELECT j.JobId
+		      FROM [Job] j
+		      WHERE j.ProjectId = '{0}'
 	      )
     ";
     private const string DeleteByProjectIdAndUserIdsQueryString = @"
-      DELETE FROM [AssignedJobResource] ajr
-      WHERE ajr.JobId IN
-	      (
-		      SELECT j.JobId
-		      FROM [Job] j
-		      WHERE j.ProjectId = {0}
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
+	      (
+		      SELECT j.JobId
+		      FROM [Job] j
+		      WHERE j.ProjectId = '{0}'
           AND j.OwnerUserId IN ({1})
 	      )
     ";
+    private const string DeleteByProjectIdsQueryString = @"
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
+	      (
+		      SELECT j.JobId
+		      FROM [Job] j
+		      WHERE j.ProjectId IN ({0})
+	      )
+    ";
     private const string DeleteByProjectIdsAndUserIdsQueryString = @"
-      DELETE FROM [AssignedJobResource] ajr
-      WHERE ajr.JobId IN
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
 	      (
 		      SELECT j.JobId
@@ -112,16 +129,16 @@
     ";
     private const string DeleteByProjectIdAndResourceIdsQueryString = @"
-      DELETE FROM [AssignedJobResource] ajr
-      WHERE ajr.JobId IN
-	      (
-		      SELECT j.JobId
-		      FROM [Job] j
-		      WHERE j.ProjectId = {0}
-	      )
-      AND ajr.ResourceId IN ({1})
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
+	      (
+		      SELECT j.JobId
+		      FROM [Job] j
+		      WHERE j.ProjectId = '{0}'
+	      )
+      AND ResourceId IN ({1})
     ";
     private const string DeleteByProjectIdsAndResourceIdsQueryString = @"
-      DELETE FROM [AssignedJobResource] ajr
-      WHERE ajr.JobId IN
+      DELETE FROM [AssignedJobResource]
+      WHERE JobId IN
 	      (
 		      SELECT j.JobId
@@ -129,5 +146,5 @@
 		      WHERE j.ProjectId IN ({0})
 	      )
-      AND ajr.ResourceId IN ({1})
+      AND ResourceId IN ({1})
     ";
     private const string CheckJobGrantedForResourceQueryString = @"
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/AssignedProjectResourceDao.cs	(revision 15577)
@@ -38,5 +38,5 @@
 
     public void DeleteByProjectIdAndResourceIds(Guid projectId, IEnumerable<Guid> resourceIds) {
-      string paramIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x)));
+      string paramIds = string.Join(",", resourceIds.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramIds)) {
         string query = string.Format(DeleteByProjectIdAndResourceIdsQueryString, projectId, paramIds);
@@ -46,7 +46,7 @@
 
     public void DeleteByProjectIdsAndResourceIds(IEnumerable<Guid> projectIds, IEnumerable<Guid> resourceIds) {
-      string paramProjectIds = string.Join(",", projectIds.Select(x => string.Format("'{0}'", x)));
-      string paramResourceIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x)));
-      if (!string.IsNullOrWhiteSpace(paramResourceIds)) {
+      string paramProjectIds = string.Join(",", projectIds.ToList().Select(x => string.Format("'{0}'", x)));
+      string paramResourceIds = string.Join(",", resourceIds.ToList().Select(x => string.Format("'{0}'", x)));
+      if (!string.IsNullOrWhiteSpace(paramProjectIds) && !string.IsNullOrWhiteSpace(paramResourceIds)) {
         string query = string.Format(DeleteByProjectIdsAndResourceIdsQueryString, paramProjectIds, paramResourceIds);
         DataContext.ExecuteCommand(query);
@@ -54,6 +54,14 @@
     }
 
+    public void DeleteByProjectIds(IEnumerable<Guid> projectIds) {
+      string paramProjectIds = string.Join(",", projectIds.ToList().Select(x => string.Format("'{0}'", x)));
+      if (!string.IsNullOrWhiteSpace(paramProjectIds)) {
+        string query = string.Format(DeleteByProjectIdsQueryString, paramProjectIds);
+        DataContext.ExecuteCommand(query);
+      }
+    }
+
     public bool CheckProjectGrantedForResources(Guid projectId, IEnumerable<Guid> resourceIds) {
-      string paramResourceIds = string.Join(",", resourceIds.Select(x => string.Format("'{0}'", x)));
+      string paramResourceIds = string.Join(",", resourceIds.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramResourceIds)) {
         string queryString = string.Format(CheckProjectGrantedForResourcesQueryString, projectId, paramResourceIds);
@@ -85,12 +93,18 @@
 
     #region String queries
-    private const string DeleteByProjectIdAndResourceIdsQueryString =
-      @"DELETE FROM [AssignedProjectResource]
-         WHERE ProjectId = '{0}'
-           AND ResourceId IN ({1});";
-    private const string DeleteByProjectIdsAndResourceIdsQueryString =
-      @"DELETE FROM [AssignedProjectResource]
-             WHERE ProjectId IN ({0})
-               AND ResourceId IN ({1});";
+    private const string DeleteByProjectIdAndResourceIdsQueryString = @"
+      DELETE FROM [AssignedProjectResource]
+        WHERE ProjectId = '{0}'
+        AND ResourceId IN ({1});
+    ";
+    private const string DeleteByProjectIdsAndResourceIdsQueryString = @"
+      DELETE FROM [AssignedProjectResource]
+        WHERE ProjectId IN ({0})
+        AND ResourceId IN ({1});
+    ";
+    private const string DeleteByProjectIdsQueryString = @"
+      DELETE FROM [AssignedProjectResource]
+        WHERE ProjectId IN ({0})
+    ";
     private const string CheckProjectGrantedForResourcesQueryString = @"
     WITH rtree AS
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs	(revision 15577)
@@ -33,6 +33,15 @@
     }
 
-    public IEnumerable<Project> GetGrantedProjectsForUser(IEnumerable<Guid> userAndGroupIds) {
-      return GetGrantedProjectsForUserQuery(DataContext, userAndGroupIds);
+    public IEnumerable<Project> GetUsageGrantedProjectsForUser(IEnumerable<Guid> userAndGroupIds) {
+      string paramUserAndGroupIds = string.Join(",", userAndGroupIds.ToList().Select(x => string.Format("'{0}'", x)));
+      if (!string.IsNullOrWhiteSpace(paramUserAndGroupIds)) {
+        string queryString = string.Format(GetUsageGrantedProjectsForUserQueryString, paramUserAndGroupIds);
+        return DataContext.ExecuteQuery<Project>(queryString);
+      }
+      return Enumerable.Empty<Project>();
+    }
+
+    public IEnumerable<Project> GetAdministrationGrantedProjectsForUser(Guid userId) {
+      return DataContext.ExecuteQuery<Project>(GetAdministrationGrantedProjectsForUserQueryString, userId);
     }
 
@@ -67,14 +76,35 @@
          where project.ProjectId == projectId
          select project).SingleOrDefault());
-    private static readonly Func<DataContext, IEnumerable<Guid>, IEnumerable<Project>> GetGrantedProjectsForUserQuery =
-      CompiledQuery.Compile((DataContext db, IEnumerable<Guid> userAndGroupIds) =>
-      (from project in db.GetTable<Project>()
-       join projectPermission in db.GetTable<ProjectPermission>()
-       on project.ProjectId equals projectPermission.ProjectId
-       where userAndGroupIds.Contains(projectPermission.GrantedUserId)
-       select project).Distinct());
     #endregion
 
-      #region String queries
+    #region String queries
+    private const string GetUsageGrantedProjectsForUserQueryString = @"
+      SELECT DISTINCT p.*
+      FROM [Project] p, [ProjectPermission] pp
+      WHERE p.ProjectId = pp.ProjectId
+      AND pp.GrantedUserId IN ({0})
+    ";
+
+    private const string GetAdministrationGrantedProjectsForUserQueryString = @"
+      WITH ptree AS
+      (
+	      SELECT ProjectId, ParentProjectId
+	      FROM [Project]
+	      UNION ALL
+	      SELECT pt.ProjectId, p.ParentProjectId
+	      FROM [Project] p
+	      JOIN ptree pt ON pt.ParentProjectId = p.ProjectId AND p.ParentProjectId <> p.ProjectId AND pt.ParentProjectId <> pt.ProjectId
+      )
+      SELECT DISTINCT parent.*
+      FROM [Project] parent
+      WHERE parent.OwnerUserId = {0}
+      UNION
+      SELECT DISTINCT child.* 
+      FROM ptree, [Project] parent, [Project] child
+      WHERE ptree.ParentProjectId = parent.ProjectId
+      AND ptree.ProjectId = child.ProjectId
+      AND parent.OwnerUserId = {0}
+    ";
+
     private const string GetChildProjectsByIdQuery = @"
     	WITH ptree AS
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectPermissionDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectPermissionDao.cs	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectPermissionDao.cs	(revision 15577)
@@ -38,5 +38,5 @@
 
     public bool CheckUserGrantedForProject(Guid projectId, IEnumerable<Guid> userAndGroupIds) {
-      string paramUserAndGroupIds = string.Join(",", userAndGroupIds.Select(x => string.Format("'{0}'", x)));
+      string paramUserAndGroupIds = string.Join(",", userAndGroupIds.ToList().Select(x => string.Format("'{0}'", x)));
       if(!string.IsNullOrWhiteSpace(paramUserAndGroupIds)) {
         string queryString = string.Format(CheckUserGrantedForProjectQueryString, projectId, paramUserAndGroupIds);
@@ -47,5 +47,5 @@
 
     public void DeleteByProjectIdAndGrantedUserIds(Guid projectId, IEnumerable<Guid> grantedUserIds) {
-      string paramIds = string.Join(",", grantedUserIds.Select(x => string.Format("'{0}'", x)));
+      string paramIds = string.Join(",", grantedUserIds.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramIds)) {
         string query = string.Format(DeleteByProjectIdAndGrantedUserIdsQueryString, projectId, paramIds);
@@ -55,6 +55,6 @@
 
     public void DeleteByProjectIdsAndGrantedUserIds(IEnumerable<Guid> projectIds, IEnumerable<Guid> grantedUserIds) {
-      string paramProjectIds = string.Join(",", projectIds.Select(x => string.Format("'{0}'", x)));
-      string paramUserIds = string.Join(",", grantedUserIds.Select(x => string.Format("'{0}'", x)));
+      string paramProjectIds = string.Join(",", projectIds.ToList().Select(x => string.Format("'{0}'", x)));
+      string paramUserIds = string.Join(",", grantedUserIds.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramProjectIds) && !string.IsNullOrWhiteSpace(paramUserIds)) {
         string query = string.Format(DeleteByProjectIdsAndGrantedUserIdsQueryString, paramProjectIds, paramUserIds);
@@ -79,5 +79,5 @@
     private const string DeleteByProjectIdsAndGrantedUserIdsQueryString = @"
       DELETE FROM [ProjectPermission]
-      WHERE ProjectId IN '({0})'
+      WHERE ProjectId IN ({0})
       AND GrantedUserId IN ({1});
     ";
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs	(revision 15577)
@@ -38,8 +38,8 @@
 
     public bool CheckExistence(IEnumerable<Guid> ids) {
-      string paramResourceIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x)));
+      string paramResourceIds = string.Join(",", ids.ToList().Select(x => string.Format("'{0}'", x)));
       if (!string.IsNullOrWhiteSpace(paramResourceIds)) {
         string queryString = string.Format(CountExistenceQuery, paramResourceIds);
-        return DataContext.ExecuteQuery<int>(queryString).Count() == ids.Count();
+        return DataContext.ExecuteQuery<int>(queryString).SingleOrDefault() == ids.Count();
       }
       return false;
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 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 15577)
@@ -151,4 +151,5 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="Settings.cs" />
     <Compile Include="Settings.Designer.cs">
       <AutoGen>True</AutoGen>
Index: branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 15577)
@@ -81,5 +81,5 @@
       </nestedChildShapes>
     </classShape>
-    <associationConnector edgePoints="[(10.875 : 6.66429768880208); (11.25 : 6.66429768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(10.875 : 6.66429768880208); (11.25 : 6.66429768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" />
       <nodes>
@@ -88,5 +88,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(8.875 : 6.56814697265625); (8.5 : 6.56814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" />
       <nodes>
@@ -134,5 +134,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(7.5 : 4.1170068359375); (7.5 : 5.875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(7.5 : 4.1170068359375); (7.5 : 5.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Task/Task_RequiredPlugin" />
       <nodes>
@@ -279,5 +279,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 4.9631982421875); (5.125 : 4.9631982421875); (5.125 : 4.5881982421875)]" fixedFrom="NotFixed" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(11.25 : 9.42390055338542); (10.375 : 9.42390055338542); (10.375 : 8); (4 : 8); (4 : 4.9631982421875); (5.125 : 4.9631982421875); (5.125 : 4.5881982421875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
       <nodes>
@@ -292,5 +292,5 @@
       </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="Algorithm" fixedTo="Algorithm">
+    <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>
@@ -299,5 +299,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 4.5)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(12.25 : 2.9631982421875); (12.25 : 4.5)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedTaskResource" />
       <nodes>
@@ -333,5 +333,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(5.656252 : 4.5881982421875); (5.656252 : 5.07535062109375); (7.41666666666667 : 5.07535062109375 : JumpStart); (7.58333333333333 : 5.07535062109375 : JumpEnd); (8.875 : 5.07535062109375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+    <associationConnector edgePoints="[(5.656252 : 4.5881982421875); (5.656252 : 5.07535062109375); (8.875 : 5.07535062109375)]" 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 15552)
+++ branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 15577)
@@ -390,5 +390,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedProjectResource", 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, DeleteOnNull=true)]
 		public Resource Resource
 		{
@@ -424,5 +424,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", 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, DeleteOnNull=true)]
 		public Project Project
 		{
@@ -5809,5 +5809,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_AssignedProjectResource", Storage="_AssignedResources", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="CASCADE")]
 		public EntitySet<AssignedProjectResource> AssignedProjectResources
 		{
@@ -5848,5 +5848,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_ProjectPermissions", ThisKey="ProjectId", OtherKey="ProjectId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_ProjectPermissions", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="CASCADE")]
 		public EntitySet<ProjectPermission> ProjectPermissions
 		{
@@ -6060,5 +6060,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_ProjectPermission", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteOnNull=true)]
 		public Project Project
 		{
