Skip to content

Commit

Permalink
Update EBean and h2db dependencies with API change
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoellnitz committed May 27, 2016
1 parent 2fbfc7e commit 255b958
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TangramVersions {
String junit = '4.12'
String testng = '6.9.11' // Gradle 2.13 has 6.3.1 - tests using e.g. testng listeners fail with other versions
String hsqldb = '1.8.1.1'
String h2db = '1.4.191'
String h2db = '1.4.192'

// The dependency injection options
String dinistiq = '0.5'
Expand Down Expand Up @@ -78,7 +78,7 @@ public class TangramVersions {
// String datanucleus = '4.1.0-release'
String datanucleus = '[4.1,4.2)'

String ebean = '7.11.4'
String ebean = '7.12.1'
String ebean_datasource = '1.1'
String ebean_agent = '4.10.1'

Expand Down
7 changes: 6 additions & 1 deletion ebean/src/org/tangram/ebean/EBeanFactoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.persistence.Entity;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tangram.content.Content;
Expand Down Expand Up @@ -150,7 +151,11 @@ public <T extends Content> List<T> listBeansOfExactClass(Class<T> cls, String qu
List<T> result = new ArrayList<>();
try {
String shortTypeName = cls.getSimpleName();
com.avaje.ebean.Query<T> query = queryString == null ? server.find(cls) : server.createQuery(cls, queryString);

com.avaje.ebean.Query<T> query = server.createQuery(cls);
if (StringUtils.isNotEmpty(queryString)) {
query.where(queryString);
} // if
if (orderProperty!=null) {
String asc = (ascending) ? " asc" : " desc";
query = query.orderBy(orderProperty+asc);
Expand Down
2 changes: 1 addition & 1 deletion ebean/test/org/tangram/ebean/test/EbeanContentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected String getManagerPrefix() {

@Override
protected String getCondition() {
return "where subtitle='great'";
return "subtitle='great'";
}


Expand Down

0 comments on commit 255b958

Please sign in to comment.