Skip to content

Commit

Permalink
Merge pull request #3 from sdl/ISSUE1
Browse files Browse the repository at this point in the history
Upgraded to release 2.1.1 version of odata core framework and added a…
  • Loading branch information
renarj authored Jul 19, 2016
2 parents e6fd44f + 7d4be12 commit 4b881b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,20 @@ private <T> List<T> executeQueryListResult(JPAQuery jpaQuery) {
}

for (Map.Entry<String, Object> entry : queryParams.entrySet()) {
query.setParameter(entry.getKey(), entry.getValue());
query.setParameter(entry.getKey(), tryConvert(entry.getValue()));
}

return query.getResultList();
} finally {
em.close();
}
}

private Object tryConvert(Object parameterType) {
if (parameterType instanceof scala.math.BigDecimal) {
return ((scala.math.BigDecimal) parameterType).intValue();
}

return parameterType;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<java.version>1.8</java.version>

<odata.version>2.1.0-SNAPSHOT</odata.version>
<odata.version>2.1.1</odata.version>
</properties>

<!-- Dependency management -->
Expand Down

0 comments on commit 4b881b3

Please sign in to comment.