mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
#299 renamed with to on
This commit is contained in:
parent
23f926fd37
commit
5b4fa7f88b
@ -186,8 +186,8 @@ public class AbstractJPQLSubQuery<Q extends AbstractJPQLSubQuery<Q>> extends Det
|
||||
return queryMixin.rightJoin(target, alias);
|
||||
}
|
||||
|
||||
public Q with(Predicate... conditions) {
|
||||
return queryMixin.with(conditions);
|
||||
public Q on(Predicate... conditions) {
|
||||
return queryMixin.on(conditions);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
||||
@ -344,6 +344,6 @@ public interface JPQLCommonQuery<Q extends JPQLCommonQuery<Q>> extends Query<Q>
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
Q with(Predicate... condition);
|
||||
Q on(Predicate... condition);
|
||||
|
||||
}
|
||||
|
||||
@ -220,8 +220,8 @@ public abstract class JPQLQueryBase<Q extends JPQLQueryBase<Q>> extends Projecta
|
||||
return queryMixin.rightJoin(target, alias);
|
||||
}
|
||||
|
||||
public Q with(Predicate... conditions) {
|
||||
return queryMixin.with(conditions);
|
||||
public Q on(Predicate... conditions) {
|
||||
return queryMixin.on(conditions);
|
||||
}
|
||||
|
||||
protected void setConstants(Map<Object, String> constants) {
|
||||
|
||||
@ -69,11 +69,8 @@ public class JPQLQueryMixin<T> extends QueryMixin<T> {
|
||||
return getSelf();
|
||||
}
|
||||
|
||||
public T with(Predicate... conditions){
|
||||
for (Predicate condition : normalize(conditions, false)){
|
||||
getMetadata().addJoinCondition(condition);
|
||||
}
|
||||
return getSelf();
|
||||
public T on(Predicate... conditions){
|
||||
return super.on(normalize(conditions, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -524,7 +524,7 @@ public class ParsingTest extends AbstractQueryTest{
|
||||
@Test
|
||||
@NoOpenJPA @NoBatooJPA
|
||||
public void Joins2() throws RecognitionException, TokenStreamException{
|
||||
query().from(cat).join(cat.mate, mate).with(mate.name.eq("Bob")).parse();
|
||||
query().from(cat).join(cat.mate, mate).on(mate.name.eq("Bob")).parse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user