use of com.querydsl.jpa.domain4.QBookMark in project querydsl by querydsl.
the class AbstractJPATest method joinEmbeddable.
@Test
@NoEclipseLink
@ExcludeIn({ ORACLE, TERADATA })
public void joinEmbeddable() {
QBookVersion bookVersion = QBookVersion.bookVersion;
QBookMark bookMark = QBookMark.bookMark;
assertEquals(Arrays.asList(), query().from(bookVersion).join(bookVersion.definition.bookMarks, bookMark).where(bookVersion.definition.bookMarks.size().eq(1), bookMark.page.eq(2357L).or(bookMark.page.eq(2356L))).select(bookVersion).fetch());
}
use of com.querydsl.jpa.domain4.QBookMark in project querydsl by querydsl.
the class JPAQueryMixinTest method orderBy_embeddable_collection.
@SuppressWarnings("unchecked")
@Test
public void orderBy_embeddable_collection() {
QBookVersion bookVersion = QBookVersion.bookVersion;
QBookMark bookMark = new QBookMark("bookVersion_definition_bookMarks");
mixin.from(bookVersion);
mixin.orderBy(bookVersion.definition.bookMarks.any().comment.asc());
QueryMetadata md = mixin.getMetadata();
assertEquals(Arrays.asList(new JoinExpression(JoinType.DEFAULT, bookVersion)), md.getJoins());
assertEquals(Arrays.asList(Expressions.stringPath(bookVersion.definition.bookMarks, "comment").asc()), md.getOrderBy());
}
Aggregations