当我使用休眠执行以下代码时,出现以下错误。错误:路径表达式以复合值结尾:
代码/java方法:
MatioFunctionExpression MatioFunctionExpression = null;
MatioFunctionExpressionId MatioFunctionExpressionId = null;
try {
MatioFunctionExpression = new MatioFunctionExpression();
MatioFunctionExpressionId = new MatioFunctionExpressionId();
MatioFunctionExpressionId.setMatioFunctionId(MatioFunctionId);
MatioFunctionExpressionId.setExpressionId(expressionId);
MatioFunctionExpression.setId(MatioFunctionExpressionId);
List<MatioFunctionExpression> instance
= (List<MatioFunctionExpression>) template.find("from MatioFunctionExpression MatioFunctionExpression where MatioFunctionExpression.id = ?",
MatioFunctionExpression.getId());
logger.debug("get successful");
if (instance.size() > 0) {
MatioFunctionExpression = instance.get(0);
} else {
logger.debug("Lookup of id [" + expressionId + "] is not found in MatioFunctionExpression table");
}