I'm getting the following exception.
Caused by:
java.lang.ClassCastException: java.math.BigInteger cannot be cast to
java.lang.Integer
with the following code
List queryResult = query.list();
for (Iterator<Object[]> it = queryResult.iterator(); it.hasNext();) {
Object[] result = it.next();
Integer childId = (Integer) result[0];
Integer grandChildCount = (Integer) result[1];
CompanyNode childNode = childNodes.get(childId);
childNode.setHasChildren(grandChildCount != 0);
childNode.setIsLeaf(grandChildCount == 0);
}
at this line
Integer grandChildCount = (Integer) result[1];
Does anybody have any idea?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…