Problem: find method not returning rows on a temporary table
Temporary table variables are always newly created, so a static find table method should be written differently compared to regular tables.
Solution
To make your find method work, you need to pass through the reference to the temporary table.
public static TmpAvgCubicMeterPrices find(
ProjId _projId,
InventDimCombinationName _inventDimCombinationName,
TmpAvgCubicMeterPrices _tmpAvgCubicMeterPrices,
boolean _forUpdate = false)
{
TmpAvgCubicMeterPrices tmpAvgCubicMeterPrices;
;
tmpAvgCubicMeterPrices.setTmpData(
_tmpAvgCubicMeterPrices);
tmpAvgCubicMeterPrices.selectForUpdate(_forUpdate);
select firstonly tmpAvgCubicMeterPrices
where tmpAvgCubicMeterPrices.ProjId
== _projId
&& tmpAvgCubicMeterPrices.InventDimCombinationName
== _inventDimCombinationName;
return tmpAvgCubicMeterPrices;
}
Post a Comment