Bug 405 : ENH: Add ability to specify a join and alias to use with a specific predicate expression
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
github
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
15/06/2012
Updated 
15/06/2012
Type 
Bug
 
Attachments 
No attachments

Could this be a possible enhancement?

Consider the following syntax (or something similar, the assignment of a specific alias is the key):

Query query =
Ebean.find(Asset.class)
.join("attributes", "attributes.definitionId, attributes.value", "a1")
.join("attributes", "attributes.definitionId, attributes.value", "a2")
.where()
.eq("a1.definitionId", 57L)
.eq("a1.value", "Quux")
.conjunction()
.eq("a2.definitionId", 56L)
.eq("a2.value", "Foo")
.query();

 
Rob 15 Jun 02:23
Refer to

https://groups.google.com/forum/?fromgroups#!topic/ebean/7S6xWMIzNF4

woResponse

Upload a file