mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-08 08:39:19 +00:00
#778 - ENH: Add support for loading named queries from ebean.xml
This commit is contained in:
1 parent
05eb0bfc55
commit
55584f09d5
8 files changed
+180
-1
No files matched your search
@@ -104,4 +104,18 @@ public class EbeanServer_eqlTest extends BaseTestCase {
|
||||
|
||||
assertThat(query.getGeneratedSql()).contains("from o_customer t0 left outer join contact t1 on t1.customer_id = t0.id ");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void namedQuery_fromXml() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
Query<Customer> query = server()
|
||||
.createNamedQuery(Customer.class, "withContactsById")
|
||||
.setParameter("id", 1);
|
||||
|
||||
query.findUnique();
|
||||
|
||||
assertThat(query.getGeneratedSql()).contains("from o_customer t0 left outer join contact t1 on t1.customer_id = t0.id ");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user