Changeset 2179 for branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/InputVariable.cs
- Timestamp:
- 07/23/09 11:01:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.SQLiteBackend/3.2/InputVariable.cs
r2178 r2179 13 13 } 14 14 15 public InputVariable(Model model, Variable variable) :base() {16 this.modelId = model.Id;15 public InputVariable(Model model, Variable variable) 16 : base() { 17 17 this.model.Entity = model; 18 this.variableId = variable.Id;19 18 this.variable.Entity = variable; 20 19 } 21 20 22 21 private int variableId; 23 [Column(Storage = "variableId", DbType = "Int not null",IsPrimaryKey = true)]24 public int TargetVariableId {22 [Column(Storage = "variableId", IsPrimaryKey = true)] 23 public int VariableId { 25 24 get { return this.variableId; } 26 25 private set { 27 26 if (variableId != value) { 27 if (variable.HasLoadedOrAssignedValue) 28 throw new ForeignKeyReferenceAlreadyHasValueException(); 28 29 variableId = value; 29 30 } … … 32 33 33 34 private EntityRef<Variable> variable; 34 [Association(Storage ="variable", ThisKey="variableId", OtherKey="Id", IsForeignKey=true)]35 [Association(Storage = "variable", ThisKey = "VariableId", OtherKey = "Id", IsForeignKey = true)] 35 36 public Variable Variable { 36 37 get { return variable.Entity; } … … 38 39 39 40 private int modelId; 40 [Column(Storage = "modelId", DbType = "Int not null",IsPrimaryKey = true)]41 [Column(Storage = "modelId", IsPrimaryKey = true)] 41 42 public int ModelId { 42 43 get { return this.modelId; } 43 44 private set { 44 45 if (modelId != value) { 46 if (model.HasLoadedOrAssignedValue) 47 throw new ForeignKeyReferenceAlreadyHasValueException(); 45 48 modelId = value; 46 49 } … … 49 52 50 53 private EntityRef<Model> model; 51 [Association(Storage = "model", ThisKey = " modelId", OtherKey = "Id", IsForeignKey = true)]54 [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)] 52 55 public Model Model { 53 56 get { return model.Entity; }
Note: See TracChangeset
for help on using the changeset viewer.