Index: /trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs	(revision 1512)
+++ /trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs	(revision 1513)
@@ -42,4 +42,7 @@
     public AdapterT TransactionalAdapter {
       get {
+        if (session == null)
+          throw new Exception("No session set!");
+
         ITransaction trans =
           session.GetCurrentTransaction();
Index: /trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj
===================================================================
--- /trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj	(revision 1512)
+++ /trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj	(revision 1513)
@@ -85,4 +85,6 @@
     <Compile Include="DataAdapterWrapperBase.cs" />
     <Compile Include="IDataAdapterWrapper.cs" />
+    <Compile Include="Relationship.cs" />
+    <Compile Include="RelationshipAdapter.cs" />
     <Compile Include="Session.cs" />
     <Compile Include="SessionFactory.cs" />
Index: /trunk/sources/HeuristicLab.DataAccess.ADOHelper/Relationship.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAccess.ADOHelper/Relationship.cs	(revision 1513)
+++ /trunk/sources/HeuristicLab.DataAccess.ADOHelper/Relationship.cs	(revision 1513)
@@ -0,0 +1,11 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.DataAccess.ADOHelper {
+  public class Relationship: PersistableObject {
+    public Guid Id2 { get; set; }
+  }
+}
Index: /trunk/sources/HeuristicLab.DataAccess.ADOHelper/RelationshipAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAccess.ADOHelper/RelationshipAdapter.cs	(revision 1513)
+++ /trunk/sources/HeuristicLab.DataAccess.ADOHelper/RelationshipAdapter.cs	(revision 1513)
@@ -0,0 +1,72 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.DataAccess.ADOHelper {
+  public class RelationshipAdapter<AdapterT, RowT>
+    where AdapterT : new()
+    where RowT : System.Data.DataRow
+    {
+    IDataAdapterWrapper<AdapterT, Relationship, RowT> tableAdapterWrapper;
+    
+    public RelationshipAdapter(
+      IDataAdapterWrapper<AdapterT, Relationship, RowT> tableAdapterWrapper) {
+      this.tableAdapterWrapper = tableAdapterWrapper;
+    }
+    
+    public void UpdateRelationships(Guid objectA, IList<Guid> relationships) {
+      //first check for created references
+      IList<Guid> existing =
+        this.GetRelationships(objectA);
+
+      foreach (Guid relationship in relationships) {
+        if (!existing.Contains(relationship)) {
+          Relationship rel = 
+            new Relationship();
+          rel.Id = objectA;
+          rel.Id2 = relationship;
+          
+          RowT inserted = 
+            tableAdapterWrapper.InsertNewRow(rel);
+
+          tableAdapterWrapper.UpdateRow(inserted);
+        }
+      }
+
+      //secondly check for deleted references
+      ICollection<Guid> deleted =
+        new List<Guid>();
+
+      foreach (Guid relationship in existing) {
+        if(!relationships.Contains(relationship)) {
+          deleted.Add(relationship);
+        }
+      }
+
+      foreach (Guid relationship in deleted) {
+        
+      }
+    }
+
+    public IList<Guid> GetRelationships(Guid objectA) {
+      IList<Guid> result =
+        new List<Guid>();
+
+      IEnumerable<RowT> rows = 
+        tableAdapterWrapper.FindById(objectA);
+
+      foreach(RowT row in rows) {
+        result.Add((Guid)row[1]);
+      }
+
+      return result;
+    }
+
+    public Session Session {
+      set {
+        tableAdapterWrapper.Session = value;
+      }
+    }
+  }
+}
