Skip to content
Snippets Groups Projects
Commit c7a44d54 authored by felmer's avatar felmer
Browse files

SSDM-10010: bug fixed: Uploading a data set in ELN cause the deletion of...

SSDM-10010: bug fixed: Uploading a data set in ELN cause the deletion of property of data type sample
parent 411534d0
No related branches found
No related tags found
No related merge requests found
......@@ -269,6 +269,7 @@ public final class EntityPropertiesEnricher implements IEntityPropertiesEnricher
sample.setCode(record.code);
sample.setSampleType(sampleTypes.get(record.saty_id));
sample.setId(record.id);
sample.setPermId(record.perm_id);
map.put(record.id, sample);
}
}
......
......@@ -66,7 +66,7 @@ public interface IPropertyListingQuery
parameterBindings = { LongSetMapper.class}, fetchSize = FETCH_SIZE)
public DataIterator<MaterialEntityPropertyRecord> getMaterials(LongSet materialIds);
@Select(sql = "SELECT id, code, saty_id FROM samples WHERE id = any(?{1})",
@Select(sql = "SELECT id, code, perm_id, saty_id FROM samples WHERE id = any(?{1})",
parameterBindings = { LongSetMapper.class}, fetchSize = FETCH_SIZE)
public DataIterator<SampleEntityPropertyRecord> getBasicSamples(LongSet sampleIds);
......
......@@ -10,4 +10,6 @@ public class SampleEntityPropertyRecord
public long saty_id;
public String code;
public String perm_id;
}
......@@ -70,6 +70,9 @@ public abstract class AbstractEntityProperty implements IEntityProperty
Material material = getMaterial();
return (material != null) ? MaterialIdentifier.print(material.getCode(), material
.getMaterialType().getCode()) : getValue();
case SAMPLE:
Sample sample = getSample();
return (sample != null) ? sample.getPermId() : getValue();
default:
return getValue();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment