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

SSDM-2601: bug in SampleQuery (SQL query) fixed

SVN: 35045
parent f622fc76
No related branches found
No related tags found
No related merge requests found
...@@ -48,13 +48,13 @@ public interface SampleQuery extends ObjectQuery ...@@ -48,13 +48,13 @@ public interface SampleQuery extends ObjectQuery
String[] codes); String[] codes);
@Select(sql = "select s.id, s.code as identifier from samples s join spaces sp on s.space_id = sp.id " @Select(sql = "select s.id, s.code as identifier from samples s join spaces sp on s.space_id = sp.id "
+ "where sp.code = ?{1} and proj_id is null and samp_id_part_of is null and s.code = any(?{2})", + "where sp.code = ?{1} and s.proj_id is null and samp_id_part_of is null and s.code = any(?{2})",
parameterBindings = { TypeMapper.class, StringArrayMapper.class }, fetchSize = FETCH_SIZE) parameterBindings = { TypeMapper.class, StringArrayMapper.class }, fetchSize = FETCH_SIZE)
public List<TechIdStringIdentifierRecord> listSpaceSampleTechIdsByCodes(String spaceCode, String[] codes); public List<TechIdStringIdentifierRecord> listSpaceSampleTechIdsByCodes(String spaceCode, String[] codes);
@Select(sql = "select s.id, s.code as identifier from samples s join spaces sp on s.space_id = sp.id " @Select(sql = "select s.id, s.code as identifier from samples s join spaces sp on s.space_id = sp.id "
+ "join samples cs on s.samp_id_part_of = cs.id " + "join samples cs on s.samp_id_part_of = cs.id "
+ "where sp.code = ?{1} and proj_id is null and cs.code = ?{2} and s.code = any(?{3})", parameterBindings = + "where sp.code = ?{1} and s.proj_id is null and cs.code = ?{2} and s.code = any(?{3})", parameterBindings =
{ TypeMapper.class, TypeMapper.class, StringArrayMapper.class }, fetchSize = FETCH_SIZE) { TypeMapper.class, TypeMapper.class, StringArrayMapper.class }, fetchSize = FETCH_SIZE)
public List<TechIdStringIdentifierRecord> listSpaceSampleTechIdsByContainerCodeAndCodes(String spaceCode, public List<TechIdStringIdentifierRecord> listSpaceSampleTechIdsByContainerCodeAndCodes(String spaceCode,
String containerCode, String[] codes); String containerCode, String[] codes);
......
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