mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
fixed full join usage in querydsl-hql
This commit is contained in:
parent
ba7724c137
commit
df22b89562
@ -100,9 +100,8 @@ public abstract class HqlQueryBase<SubType extends HqlQueryBase<SubType>> extend
|
||||
return _this;
|
||||
}
|
||||
|
||||
public SubType fullJoin(EEntity<?> o) {
|
||||
// ?!?
|
||||
joins.add(new JoinExpression<HqlJoinMeta>(JoinType.INNERJOIN,o));
|
||||
public SubType fullJoin(HqlJoinMeta meta, EEntity<?> o) {
|
||||
joins.add(new JoinExpression<HqlJoinMeta>(JoinType.FULLJOIN, o, meta));
|
||||
return _this;
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +103,8 @@ public class HqlParserTest extends QueryBaseWithDomain<HqlParserTest> {
|
||||
from(cat).leftJoin(cat.mate.kittens.as(kittens)).parse();
|
||||
|
||||
// parse( "from Formula form full join form.parameter param" );
|
||||
from(form).fullJoin(form.parameter.as(param)).parse();
|
||||
// HSQLDB doesn't support full join
|
||||
// from(form).fullJoin(form.parameter.as(param)).parse();
|
||||
|
||||
// parse( "from eg.Cat as cat join cat.mate as mate left join cat.kittens as kitten" );
|
||||
from(cat).join(cat.mate.as(mate)).leftJoin(cat.kittens.as(kitten)).parse();
|
||||
@ -129,7 +130,8 @@ public class HqlParserTest extends QueryBaseWithDomain<HqlParserTest> {
|
||||
from($(c)).leftJoin($(c.getMate().getKittens()).as($(k))).parse();
|
||||
|
||||
// parse( "from Formula form full join form.parameter param" );
|
||||
from($(f)).fullJoin($(f.getParameter()).as($(p))).parse();
|
||||
// HSQLDB doesn't support full join
|
||||
// from($(f)).fullJoin($(f.getParameter()).as($(p))).parse();
|
||||
|
||||
// parse( "from eg.Cat as cat join cat.mate as mate left join cat.kittens as kitten" );
|
||||
from($(c)).innerJoin($(c.getMate()).as($(m)))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user