Changeset 5119


Ignore:
Timestamp:
Oct 8, 2009, 10:46:51 AM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1401: One-to-one associations should not be synchronized in the data layer classes

Location:
trunk/src/core/net/sf/basedb/core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Hybridization.java

    r4889 r5119  
    2323package net.sf.basedb.core;
    2424
     25import net.sf.basedb.core.data.ArraySlideData;
    2526import net.sf.basedb.core.data.HybridizationData;
    2627import net.sf.basedb.core.query.Expressions;
     
    291292  {
    292293    checkPermission(Permission.WRITE);
    293     if(arraySlide != null) arraySlide.checkPermission(Permission.USE);
    294     getData().setArraySlide(arraySlide == null ? null : arraySlide.getData());
     294    ArraySlideData data = null;
     295    if(arraySlide != null)
     296    {
     297      arraySlide.checkPermission(Permission.USE);
     298      data = arraySlide.getData();
     299      data.setHybridization(getData());
     300    }
     301    getData().setArraySlide(data);
    295302  }
    296303 
  • trunk/src/core/net/sf/basedb/core/MeasuredBioMaterial.java

    r4889 r5119  
    357357      well.checkPermission(Permission.USE);
    358358      bw = well.getData();
    359     }
     359      bw.setBioMaterial(getData());
     360    }
    360361    getData().setBioWell(bw);
    361362  }
  • trunk/src/core/net/sf/basedb/core/data/ArraySlideData.java

    r4889 r5119  
    132132  }
    133133
    134   void setHybridization(HybridizationData hybridization)
     134  public void setHybridization(HybridizationData hybridization)
    135135  {
    136136    this.hybridization = hybridization;
  • trunk/src/core/net/sf/basedb/core/data/BioWellData.java

    r4731 r5119  
    8989    return bioMaterial;
    9090  }
    91   void setBioMaterial(MeasuredBioMaterialData bioMaterial)
     91  public void setBioMaterial(MeasuredBioMaterialData bioMaterial)
    9292  {
    9393    this.bioMaterial = bioMaterial;
  • trunk/src/core/net/sf/basedb/core/data/HybridizationData.java

    r4889 r5119  
    5555  public void setArraySlide(ArraySlideData arraySlide)
    5656  {
    57     if (arraySlide != null) arraySlide.setHybridization(this);
    5857    this.arraySlide = arraySlide;
    5958  }
  • trunk/src/core/net/sf/basedb/core/data/MeasuredBioMaterialData.java

    r4889 r5119  
    163163  public void setBioWell(BioWellData bioWell)
    164164  {
    165     if (bioWell != null) bioWell.setBioMaterial(this);
    166165    this.bioWell = bioWell;
    167166  }
Note: See TracChangeset for help on using the changeset viewer.