mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-23 07:11:55 +00:00
#1375 - Bug: RawSql parsing fails when using placeholders
This commit is contained in:
1 parent
53b606289d
commit
cb0dee998b
2 files changed
+17
-6
No files matched your search
@@ -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