In this code example, I'm getting a NonUniqueObjectException from the code snip below - the object getting passed in to be used to copy the properties to the new object. The AmountHistory object isn't fetched from the database anywhere else in the code, so I'm perplexed as to how it could be getting this error. So in helping in debugging the issue, I'd like to find some way to examine the Session to see if this object is loaded that would be causing this issue.
private static void
insertAmountHistoryList(Amount pAmtRow, Long pHistoryUni, Session pSession)
List<Amount> lAmtList = (List<Amount>) pAmtRow.getAmountList();
if (lAmtList != null)
for (Amount lAmt : lAmtList)
AmountHistory lAmtHist = new AmountHistory();