mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1375 - Bug: RawSql parsing fails when using placeholders
This commit is contained in:
@@ -57,4 +57,19 @@ public class TestRawSqlParsing extends BaseTestCase {
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhere() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql sql = RawSqlBuilder.parse("SELECT id, name FROM o_customer ${where}").create();
|
||||
|
||||
List<Customer> customers = Ebean.createQuery(Customer.class)
|
||||
.setRawSql(sql)
|
||||
.where().gt("id", 1)
|
||||
.findList();
|
||||
|
||||
assertThat(customers).isNotEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user