Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Algorithm.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Algorithm.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Algorithm.cs	(revision 2181)
@@ -26,5 +26,5 @@
     public int Id {
       get { return this.id; }
-      private set { this.id = value; }
+      set { this.id = value; }
     }
 
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/HeuristicLab.Modeling.SQLiteBackend-3.2.csproj
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/HeuristicLab.Modeling.SQLiteBackend-3.2.csproj	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/HeuristicLab.Modeling.SQLiteBackend-3.2.csproj	(revision 2181)
@@ -66,4 +66,12 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="DbLinq, Version=0.19.0.0, Culture=neutral, PublicKeyToken=61e015a67077348b, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\dblinq2007\build.dbg\DbLinq.dll</HintPath>
+    </Reference>
+    <Reference Include="DbLinq.Sqlite, Version=0.19.0.0, Culture=neutral, PublicKeyToken=61e015a67077348b, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\..\..\dblinq2007\build.dbg\DbLinq.Sqlite.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core">
@@ -105,14 +113,6 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Algorithm.cs" />
-    <Compile Include="InputVariable.cs" />
-    <Compile Include="InputVariableResult.cs" />
-    <Compile Include="Model.cs" />
-    <Compile Include="ModelingDataContext.cs" />
-    <Compile Include="ModelResult.cs" />
-    <Compile Include="Problem.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Result.cs" />
-    <Compile Include="Variable.cs" />
+    <Compile Include="SQLiteMapping_generated.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Model.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Model.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Model.cs	(revision 2181)
@@ -25,5 +25,5 @@
     public int Id {
       get { return this.id; }
-      private set { this.id = value; }
+      set { this.id = value; }
     }
 
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/ModelingDataContext.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/ModelingDataContext.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/ModelingDataContext.cs	(revision 2181)
@@ -1,11 +1,13 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Data.Linq;
+
 using System.Data.Linq.Mapping;
-using System.Data.Sql;
-using System.Text;
+using DbLinq.Data.Linq;
+using DbLinq.Sqlite;
+using System.Text;  
+using System.Data.SQLite;
 
 namespace HeuristicLab.Modeling.SQLiteBackend {
-  public class ModelingDataContext : DataContext{
+  public class ModelingDataContext : SqliteDataContext {
 
     public static string connectionString;
@@ -15,5 +17,5 @@
 
     public ModelingDataContext(string connection)
-      : base(connection) {
+      : base(new SQLiteConnection(connection)) {
     }
 
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Problem.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Problem.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Problem.cs	(revision 2181)
@@ -22,5 +22,5 @@
     public int Id {
       get { return this.id; }
-      private set { this.id = value; }
+      set { this.id = value; }
     }
 
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Result.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Result.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Result.cs	(revision 2181)
@@ -21,5 +21,5 @@
     public int Id {
       get { return this.id; }
-      private set { this.id = value; }
+      set { this.id = value; }
     }
 
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/SQLiteMapping_generated.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/SQLiteMapping_generated.cs	(revision 2181)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/SQLiteMapping_generated.cs	(revision 2181)
@@ -0,0 +1,1234 @@
+﻿#region Auto-generated classes for main database on 2009-07-23 15:37:24Z
+
+//
+//  ____  _     __  __      _        _
+// |  _ \| |__ |  \/  | ___| |_ __ _| |
+// | | | | '_ \| |\/| |/ _ \ __/ _` | |
+// | |_| | |_) | |  | |  __/ || (_| | |
+// |____/|_.__/|_|  |_|\___|\__\__,_|_|
+//
+// Auto-generated from main on 2009-07-23 15:37:24Z
+// Please visit http://linq.to/db for more information
+
+#endregion
+
+using System;
+using System.Data;
+using System.Data.Linq.Mapping;
+using DbLinq.Data.Linq.Mapping;
+using System.Diagnostics;
+using System.Reflection;
+using DbLinq.Data.Linq;
+using DbLinq.Vendor;
+using System.ComponentModel;
+
+namespace HeuristicLab.Modeling.SQLiteBackend {
+
+  public partial class ModelingDataContext : DataContext {
+
+    public static string connectionString;
+
+    public ModelingDataContext()
+      : this(connectionString) {
+    }
+
+    public ModelingDataContext(string connectionString)
+      : this(new System.Data.SQLite.SQLiteConnection(connectionString)) { 
+    }
+
+    public ModelingDataContext(IDbConnection connection)
+      : base(connection, new DbLinq.Sqlite.SqliteVendor()) {
+    }
+
+    public ModelingDataContext(IDbConnection connection, IVendor vendor)
+      : base(connection, vendor) {
+    }
+
+    public Table<Algorithm> Algorithms { get { return GetTable<Algorithm>(); } }
+    public Table<InputVariable> InputVariables { get { return GetTable<InputVariable>(); } }
+    public Table<InputVariableResult> InputVariableResults { get { return GetTable<InputVariableResult>(); } }
+    public Table<Model> Models { get { return GetTable<Model>(); } }
+    public Table<ModelResult> ModelResults { get { return GetTable<ModelResult>(); } }
+    public Table<Problem> Problems { get { return GetTable<Problem>(); } }
+    public Table<Result> Results { get { return GetTable<Result>(); } }
+    public Table<Variable> Variables { get { return GetTable<Variable>(); } }
+
+  }
+
+  [Table(Name = "main.Algorithm")]
+  public partial class Algorithm : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region string Description
+
+    private string _description;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_description", Name = "Description", DbType = "text")]
+    public string Description {
+      get {
+        return _description;
+      }
+      set {
+        if (value != _description) {
+          _description = value;
+          OnPropertyChanged("Description");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int Id
+
+    private int _Id;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_Id", Name = "Id", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get {
+        return _Id;
+      }
+      set {
+        if (value != _Id) {
+          _Id = value;
+          OnPropertyChanged("Id");
+        }
+      }
+    }
+
+    #endregion
+
+    #region string Name
+
+    private string _name;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_name", Name = "Name", DbType = "text", CanBeNull = false)]
+    public string Name {
+      get {
+        return _name;
+      }
+      set {
+        if (value != _name) {
+          _name = value;
+          OnPropertyChanged("Name");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column Id to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return _Id == null ? 0 : _Id.GetHashCode();
+    }
+
+    public override bool Equals(object o) {
+      Algorithm other = o as Algorithm;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_Id, other._Id);
+    }
+
+    #endregion
+
+    #region Children
+
+    private EntitySet<Model> _model;
+    [Association(Storage = "_model", OtherKey = "AlgorithmId", ThisKey = "Id", Name = "fk_Model_0")]
+    [DebuggerNonUserCode]
+    public EntitySet<Model> Model {
+      get {
+        return _model;
+      }
+      set {
+        _model = value;
+      }
+    }
+
+
+    #endregion
+
+    #region Attachement handlers
+
+    private void Model_Attach(Model entity) {
+      entity.Algorithm = this;
+    }
+
+    private void Model_Detach(Model entity) {
+      entity.Algorithm = null;
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public Algorithm() {
+      _model = new EntitySet<Model>(Model_Attach, Model_Detach);
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.InputVariable")]
+  public partial class InputVariable : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int ModelId
+
+    private int _modelId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_modelId", Name = "ModelId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int ModelId {
+      get {
+        return _modelId;
+      }
+      set {
+        if (value != _modelId) {
+          _modelId = value;
+          OnPropertyChanged("ModelId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int VariableId
+
+    private int _variableId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_variableId", Name = "VariableId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int VariableId {
+      get {
+        return _variableId;
+      }
+      set {
+        if (value != _variableId) {
+          _variableId = value;
+          OnPropertyChanged("VariableId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column ModelId, VariableId to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return (_modelId == null ? 0 : _modelId.GetHashCode()) ^ (_variableId == null ? 0 : _variableId.GetHashCode());
+    }
+
+    public override bool Equals(object o) {
+      InputVariable other = o as InputVariable;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_modelId, other._modelId) && object.Equals(_variableId, other._variableId);
+    }
+
+    #endregion
+
+    #region Parents
+
+    private EntityRef<Variable> _variable;
+    [Association(Storage = "_variable", OtherKey = "Id", ThisKey = "VariableId", Name = "fk_InputVariable_0", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Variable Variable {
+      get {
+        return _variable.Entity;
+      }
+      set {
+        if (value != _variable.Entity) {
+          if (_variable.Entity != null) {
+            var previousVariable = _variable.Entity;
+            _variable.Entity = null;
+            previousVariable.InputVariable.Remove(this);
+          }
+          _variable.Entity = value;
+          if (value != null) {
+            value.InputVariable.Add(this);
+            _variableId = (int)value.Id;
+          } else {
+            _variableId = default(int);
+          }
+        }
+      }
+    }
+
+    private EntityRef<Model> _model;
+    [Association(Storage = "_model", OtherKey = "Id", ThisKey = "ModelId", Name = "fk_InputVariable_1", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Model Model {
+      get {
+        return _model.Entity;
+      }
+      set {
+        if (value != _model.Entity) {
+          if (_model.Entity != null) {
+            var previousModel = _model.Entity;
+            _model.Entity = null;
+            previousModel.InputVariable.Remove(this);
+          }
+          _model.Entity = value;
+          if (value != null) {
+            value.InputVariable.Add(this);
+            _modelId = (int)value.Id;
+          } else {
+            _modelId = default(int);
+          }
+        }
+      }
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public InputVariable() {
+      _variable = new EntityRef<Variable>();
+      _model = new EntityRef<Model>();
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.InputVariableResult")]
+  public partial class InputVariableResult : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int ModelId
+
+    private int _modelId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_modelId", Name = "ModelId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int ModelId {
+      get {
+        return _modelId;
+      }
+      set {
+        if (value != _modelId) {
+          _modelId = value;
+          OnPropertyChanged("ModelId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int ResultId
+
+    private int _resultId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_resultId", Name = "ResultId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int ResultId {
+      get {
+        return _resultId;
+      }
+      set {
+        if (value != _resultId) {
+          _resultId = value;
+          OnPropertyChanged("ResultId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int VariableId
+
+    private int _variableId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_variableId", Name = "VariableId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int VariableId {
+      get {
+        return _variableId;
+      }
+      set {
+        if (value != _variableId) {
+          _variableId = value;
+          OnPropertyChanged("VariableId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column ModelId, ResultId, VariableId to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return (_modelId == null ? 0 : _modelId.GetHashCode()) ^
+        (_resultId == null ? 0 : _resultId.GetHashCode()) ^
+        (_variableId == null ? 0 : _variableId.GetHashCode());
+    }
+
+    public override bool Equals(object o) {
+      InputVariableResult other = o as InputVariableResult;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_modelId, other._modelId) && object.Equals(_resultId, other._resultId) && object.Equals(_variableId, other._variableId);
+    }
+
+    #endregion
+
+    #region Parents
+
+    private EntityRef<Result> _result;
+    [Association(Storage = "_result", OtherKey = "Id", ThisKey = "ResultId", Name = "fk_InputVariableResult_0", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Result Result {
+      get {
+        return _result.Entity;
+      }
+      set {
+        if (value != _result.Entity) {
+          if (_result.Entity != null) {
+            var previousResult = _result.Entity;
+            _result.Entity = null;
+            previousResult.InputVariableResult.Remove(this);
+          }
+          _result.Entity = value;
+          if (value != null) {
+            value.InputVariableResult.Add(this);
+            _resultId = (int)value.Id;
+          } else {
+            _resultId = default(int);
+          }
+        }
+      }
+    }
+
+    private EntityRef<Variable> _variable;
+    [Association(Storage = "_variable", OtherKey = "Id", ThisKey = "VariableId", Name = "fk_InputVariableResult_1", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Variable Variable {
+      get {
+        return _variable.Entity;
+      }
+      set {
+        if (value != _variable.Entity) {
+          if (_variable.Entity != null) {
+            var previousVariable = _variable.Entity;
+            _variable.Entity = null;
+            previousVariable.InputVariableResult.Remove(this);
+          }
+          _variable.Entity = value;
+          if (value != null) {
+            value.InputVariableResult.Add(this);
+            _variableId = (int)value.Id;
+          } else {
+            _variableId = default(int);
+          }
+        }
+      }
+    }
+
+    private EntityRef<Model> _model;
+    [Association(Storage = "_model", OtherKey = "Id", ThisKey = "ModelId", Name = "fk_InputVariableResult_2", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Model Model {
+      get {
+        return _model.Entity;
+      }
+      set {
+        if (value != _model.Entity) {
+          if (_model.Entity != null) {
+            var previousModel = _model.Entity;
+            _model.Entity = null;
+            previousModel.InputVariableResult.Remove(this);
+          }
+          _model.Entity = value;
+          if (value != null) {
+            value.InputVariableResult.Add(this);
+            _modelId = (int)value.Id;
+          } else {
+            _modelId = default(int);
+          }
+        }
+      }
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public InputVariableResult() {
+      _result = new EntityRef<Result>();
+      _variable = new EntityRef<Variable>();
+      _model = new EntityRef<Model>();
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.Model")]
+  public partial class Model : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int AlgorithmId
+
+    private int _algorithmId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_algorithmId", Name = "AlgorithmId", DbType = "integer", CanBeNull = false)]
+    public int AlgorithmId {
+      get {
+        return _algorithmId;
+      }
+      set {
+        if (value != _algorithmId) {
+          _algorithmId = value;
+          OnPropertyChanged("AlgorithmId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region Byte[] Data
+
+    private object _data;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_data", Name = "Data", DbType = "blob", CanBeNull = false)]
+    public object Data {
+      get {
+        return _data;
+      }
+      set {
+        if (value != _data) {
+          _data = value;
+          OnPropertyChanged("Data");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int Id
+
+    private int _Id;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_Id", Name = "Id", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get {
+        return _Id;
+      }
+      set {
+        if (value != _Id) {
+          _Id = value;
+          OnPropertyChanged("Id");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int TargetVariableId
+
+    private int _targetVariableId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_targetVariableId", Name = "TargetVariableId", DbType = "integer", CanBeNull = false)]
+    public int TargetVariableId {
+      get {
+        return _targetVariableId;
+      }
+      set {
+        if (value != _targetVariableId) {
+          _targetVariableId = value;
+          OnPropertyChanged("TargetVariableId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column Id to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return _Id == null ? 0 : _Id.GetHashCode();
+    }
+
+    public override bool Equals(object o) {
+      Model other = o as Model;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_Id, other._Id);
+    }
+
+    #endregion
+
+    #region Children
+
+    private EntitySet<InputVariable> _inputVariable;
+    [Association(Storage = "_inputVariable", OtherKey = "ModelId", ThisKey = "Id", Name = "fk_InputVariable_1")]
+    [DebuggerNonUserCode]
+    public EntitySet<InputVariable> InputVariable {
+      get {
+        return _inputVariable;
+      }
+      set {
+        _inputVariable = value;
+      }
+    }
+
+    private EntitySet<InputVariableResult> _inputVariableResult;
+    [Association(Storage = "_inputVariableResult", OtherKey = "ModelId", ThisKey = "Id", Name = "fk_InputVariableResult_2")]
+    [DebuggerNonUserCode]
+    public EntitySet<InputVariableResult> InputVariableResult {
+      get {
+        return _inputVariableResult;
+      }
+      set {
+        _inputVariableResult = value;
+      }
+    }
+
+    private EntitySet<ModelResult> _modelResult;
+    [Association(Storage = "_modelResult", OtherKey = "ModelId", ThisKey = "Id", Name = "fk_ModelResult_1")]
+    [DebuggerNonUserCode]
+    public EntitySet<ModelResult> ModelResult {
+      get {
+        return _modelResult;
+      }
+      set {
+        _modelResult = value;
+      }
+    }
+
+
+    #endregion
+
+    #region Parents
+
+    private EntityRef<Algorithm> _algorithm;
+    [Association(Storage = "_algorithm", OtherKey = "Id", ThisKey = "AlgorithmId", Name = "fk_Model_0", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Algorithm Algorithm {
+      get {
+        return _algorithm.Entity;
+      }
+      set {
+        if (value != _algorithm.Entity) {
+          if (_algorithm.Entity != null) {
+            var previousAlgorithm = _algorithm.Entity;
+            _algorithm.Entity = null;
+            previousAlgorithm.Model.Remove(this);
+          }
+          _algorithm.Entity = value;
+          if (value != null) {
+            value.Model.Add(this);
+            _algorithmId = (int)value.Id;
+          } else {
+            _algorithmId = default(int);
+          }
+        }
+      }
+    }
+
+    private EntityRef<Variable> _variable;
+    [Association(Storage = "_variable", OtherKey = "Id", ThisKey = "TargetVariableId", Name = "fk_Model_1", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Variable TargetVariable {
+      get {
+        return _variable.Entity;
+      }
+      set {
+        if (value != _variable.Entity) {
+          if (_variable.Entity != null) {
+            var previousVariable = _variable.Entity;
+            _variable.Entity = null;
+            previousVariable.Model.Remove(this);
+          }
+          _variable.Entity = value;
+          if (value != null) {
+            value.Model.Add(this);
+            _targetVariableId = (int)value.Id;
+          } else {
+            _targetVariableId = default(int);
+          }
+        }
+      }
+    }
+
+
+    #endregion
+
+    #region Attachement handlers
+
+    private void InputVariable_Attach(InputVariable entity) {
+      entity.Model = this;
+    }
+
+    private void InputVariable_Detach(InputVariable entity) {
+      entity.Model = null;
+    }
+
+    private void InputVariableResult_Attach(InputVariableResult entity) {
+      entity.Model = this;
+    }
+
+    private void InputVariableResult_Detach(InputVariableResult entity) {
+      entity.Model = null;
+    }
+
+    private void ModelResult_Attach(ModelResult entity) {
+      entity.Model = this;
+    }
+
+    private void ModelResult_Detach(ModelResult entity) {
+      entity.Model = null;
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public Model() {
+      _inputVariable = new EntitySet<InputVariable>(InputVariable_Attach, InputVariable_Detach);
+      _inputVariableResult = new EntitySet<InputVariableResult>(InputVariableResult_Attach, InputVariableResult_Detach);
+      _modelResult = new EntitySet<ModelResult>(ModelResult_Attach, ModelResult_Detach);
+      _algorithm = new EntityRef<Algorithm>();
+      _variable = new EntityRef<Variable>();
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.ModelResult")]
+  public partial class ModelResult : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int ModelId
+
+    private int _modelId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_modelId", Name = "ModelId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int ModelId {
+      get {
+        return _modelId;
+      }
+      set {
+        if (value != _modelId) {
+          _modelId = value;
+          OnPropertyChanged("ModelId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int ResultId
+
+    private int _resultId;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_resultId", Name = "ResultId", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
+    public int ResultId {
+      get {
+        return _resultId;
+      }
+      set {
+        if (value != _resultId) {
+          _resultId = value;
+          OnPropertyChanged("ResultId");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column ModelId, ResultId to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return (_modelId == null ? 0 : _modelId.GetHashCode()) ^ (_resultId == null ? 0 : _resultId.GetHashCode());
+    }
+
+    public override bool Equals(object o) {
+      ModelResult other = o as ModelResult;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_modelId, other._modelId) && object.Equals(_resultId, other._resultId);
+    }
+
+    #endregion
+
+    #region Parents
+
+    private EntityRef<Result> _result;
+    [Association(Storage = "_result", OtherKey = "Id", ThisKey = "ResultId", Name = "fk_ModelResult_0", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Result Result {
+      get {
+        return _result.Entity;
+      }
+      set {
+        if (value != _result.Entity) {
+          if (_result.Entity != null) {
+            var previousResult = _result.Entity;
+            _result.Entity = null;
+            previousResult.ModelResult.Remove(this);
+          }
+          _result.Entity = value;
+          if (value != null) {
+            value.ModelResult.Add(this);
+            _resultId = (int)value.Id;
+          } else {
+            _resultId = default(int);
+          }
+        }
+      }
+    }
+
+    private EntityRef<Model> _model;
+    [Association(Storage = "_model", OtherKey = "Id", ThisKey = "ModelId", Name = "fk_ModelResult_1", IsForeignKey = true)]
+    [DebuggerNonUserCode]
+    public Model Model {
+      get {
+        return _model.Entity;
+      }
+      set {
+        if (value != _model.Entity) {
+          if (_model.Entity != null) {
+            var previousModel = _model.Entity;
+            _model.Entity = null;
+            previousModel.ModelResult.Remove(this);
+          }
+          _model.Entity = value;
+          if (value != null) {
+            value.ModelResult.Add(this);
+            _modelId = (int)(int)value.Id;
+          } else {
+            _modelId = default(int);
+          }
+        }
+      }
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public ModelResult() {
+      _result = new EntityRef<Result>();
+      _model = new EntityRef<Model>();
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.Problem")]
+  public partial class Problem : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region Byte[] Data
+
+    private Byte[] _data;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_data", Name = "Data", DbType = "blob", CanBeNull = false)]
+    public Byte[] Data {
+      get {
+        return _data;
+      }
+      set {
+        if (value != _data) {
+          _data = value;
+          OnPropertyChanged("Data");
+        }
+      }
+    }
+
+    #endregion
+
+    #region int Id
+
+    private int _Id;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_Id", Name = "Id", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get {
+        return _Id;
+      }
+      set {
+        if (value != _Id) {
+          _Id = value;
+          OnPropertyChanged("Id");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column Id to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return _Id == null ? 0 : _Id.GetHashCode();
+    }
+
+    public override bool Equals(object o) {
+      Problem other = o as Problem;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_Id, other._Id);
+    }
+
+    #endregion
+
+    #region ctor
+
+    public Problem() {
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.Result")]
+  public partial class Result : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int Id
+
+    private int _Id;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_Id", Name = "Id", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get {
+        return _Id;
+      }
+      set {
+        if (value != _Id) {
+          _Id = value;
+          OnPropertyChanged("Id");
+        }
+      }
+    }
+
+    #endregion
+
+    #region string Name
+
+    private string _name;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_name", Name = "Name", DbType = "text", CanBeNull = false)]
+    public string Name {
+      get {
+        return _name;
+      }
+      set {
+        if (value != _name) {
+          _name = value;
+          OnPropertyChanged("Name");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column Id to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return _Id == null ? 0 : _Id.GetHashCode();
+    }
+
+    public override bool Equals(object o) {
+      Result other = o as Result;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_Id, other._Id);
+    }
+
+    #endregion
+
+    #region Children
+
+    private EntitySet<InputVariableResult> _inputVariableResult;
+    [Association(Storage = "_inputVariableResult", OtherKey = "ResultId", ThisKey = "Id", Name = "fk_InputVariableResult_0")]
+    [DebuggerNonUserCode]
+    public EntitySet<InputVariableResult> InputVariableResult {
+      get {
+        return _inputVariableResult;
+      }
+      set {
+        _inputVariableResult = value;
+      }
+    }
+
+    private EntitySet<ModelResult> _modelResult;
+    [Association(Storage = "_modelResult", OtherKey = "ResultId", ThisKey = "Id", Name = "fk_ModelResult_0")]
+    [DebuggerNonUserCode]
+    public EntitySet<ModelResult> ModelResult {
+      get {
+        return _modelResult;
+      }
+      set {
+        _modelResult = value;
+      }
+    }
+
+
+    #endregion
+
+    #region Attachement handlers
+
+    private void InputVariableResult_Attach(InputVariableResult entity) {
+      entity.Result = this;
+    }
+
+    private void InputVariableResult_Detach(InputVariableResult entity) {
+      entity.Result = null;
+    }
+
+    private void ModelResult_Attach(ModelResult entity) {
+      entity.Result = this;
+    }
+
+    private void ModelResult_Detach(ModelResult entity) {
+      entity.Result = null;
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public Result() {
+      _inputVariableResult = new EntitySet<InputVariableResult>(InputVariableResult_Attach, InputVariableResult_Detach);
+      _modelResult = new EntitySet<ModelResult>(ModelResult_Attach, ModelResult_Detach);
+    }
+
+    #endregion
+
+  }
+
+  [Table(Name = "main.Variable")]
+  public partial class Variable : INotifyPropertyChanged {
+    #region INotifyPropertyChanged handling
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void OnPropertyChanged(string propertyName) {
+      if (PropertyChanged != null) {
+        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+
+    #endregion
+
+    #region int Id
+
+    private int _Id;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_Id", Name = "Id", DbType = "integer", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get {
+        return _Id;
+      }
+      set {
+        if (value != _Id) {
+          _Id = value;
+          OnPropertyChanged("Id");
+        }
+      }
+    }
+
+    #endregion
+
+    #region string Name
+
+    private string _name;
+    [DebuggerNonUserCode]
+    [Column(Storage = "_name", Name = "Name", DbType = "text", CanBeNull = false)]
+    public string Name {
+      get {
+        return _name;
+      }
+      set {
+        if (value != _name) {
+          _name = value;
+          OnPropertyChanged("Name");
+        }
+      }
+    }
+
+    #endregion
+
+    #region GetHashCode(), Equals() - uses column Id to look up objects in liveObjectMap
+
+    public override int GetHashCode() {
+      return _Id == null ? 0 : _Id.GetHashCode();
+    }
+
+    public override bool Equals(object o) {
+      Variable other = o as Variable;
+      if (other == null) {
+        return false;
+      }
+      return object.Equals(_Id, other._Id);
+    }
+
+    #endregion
+
+    #region Children
+
+    private EntitySet<InputVariable> _inputVariable;
+    [Association(Storage = "_inputVariable", OtherKey = "VariableId", ThisKey = "Id", Name = "fk_InputVariable_0")]
+    [DebuggerNonUserCode]
+    public EntitySet<InputVariable> InputVariable {
+      get {
+        return _inputVariable;
+      }
+      set {
+        _inputVariable = value;
+      }
+    }
+
+    private EntitySet<InputVariableResult> _inputVariableResult;
+    [Association(Storage = "_inputVariableResult", OtherKey = "VariableId", ThisKey = "Id", Name = "fk_InputVariableResult_1")]
+    [DebuggerNonUserCode]
+    public EntitySet<InputVariableResult> InputVariableResult {
+      get {
+        return _inputVariableResult;
+      }
+      set {
+        _inputVariableResult = value;
+      }
+    }
+
+    private EntitySet<Model> _model;
+    [Association(Storage = "_model", OtherKey = "TargetVariableId", ThisKey = "Id", Name = "fk_Model_1")]
+    [DebuggerNonUserCode]
+    public EntitySet<Model> Model {
+      get {
+        return _model;
+      }
+      set {
+        _model = value;
+      }
+    }
+
+
+    #endregion
+
+    #region Attachement handlers
+
+    private void InputVariable_Attach(InputVariable entity) {
+      entity.Variable = this;
+    }
+
+    private void InputVariable_Detach(InputVariable entity) {
+      entity.Variable = null;
+    }
+
+    private void InputVariableResult_Attach(InputVariableResult entity) {
+      entity.Variable = this;
+    }
+
+    private void InputVariableResult_Detach(InputVariableResult entity) {
+      entity.Variable = null;
+    }
+
+    private void Model_Attach(Model entity) {
+      entity.TargetVariable = this;
+    }
+
+    private void Model_Detach(Model entity) {
+      entity.TargetVariable = null;
+    }
+
+
+    #endregion
+
+    #region ctor
+
+    public Variable() {
+      _inputVariable = new EntitySet<InputVariable>(InputVariable_Attach, InputVariable_Detach);
+      _inputVariableResult = new EntitySet<InputVariableResult>(InputVariableResult_Attach, InputVariableResult_Detach);
+      _model = new EntitySet<Model>(Model_Attach, Model_Detach);
+    }
+
+    #endregion
+
+  }
+}
Index: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Variable.cs
===================================================================
--- branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Variable.cs	(revision 2179)
+++ branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/Variable.cs	(revision 2181)
@@ -21,5 +21,5 @@
     public int Id {
       get { return this.id; }
-      private set { this.id = value; }
+      set { this.id = value; }
     }
 
