Skip to content

Commit

Permalink
don't drop temp table tokens when generating MVFK sql (#5581)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-matthewb authored Jun 12, 2024
1 parent eb80e18 commit d4a99b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/src/org/labkey/api/data/MultiValuedLookupColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ else if ("lsidtype".equalsIgnoreCase(lc.getSqlTypeName()))
join = join.replace("LEFT OUTER", "INNER");
select.append(join);
select.addAll(fragment.getParams());
select.addTempTokens(fragment);
}

select.append(" WHERE ");
Expand Down
5 changes: 5 additions & 0 deletions api/src/org/labkey/api/data/SQLFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,11 @@ public void addTempToken(Object tempToken)
tempTokens.add(tempToken);
}

public void addTempTokens(SQLFragment other)
{
tempTokens.add(other.tempTokens);
}

public static SQLFragment prettyPrint(SQLFragment from)
{
SQLFragment sqlf = new SQLFragment(from);
Expand Down

0 comments on commit d4a99b0

Please sign in to comment.