Search in sources :

Example 11 with IncludeIn

use of com.querydsl.core.testutil.IncludeIn in project querydsl by querydsl.

the class MergeBase method merge_with_keys_and_subQuery.

@Test
@IncludeIn(H2)
public void merge_with_keys_and_subQuery() {
    assertEquals(1, insert(survey).set(survey.id, 6).set(survey.name, "H").execute());
    // keys + subquery
    QSurvey survey2 = new QSurvey("survey2");
    assertEquals(2, merge(survey).keys(survey.id).select(query().from(survey2).select(survey2.id.add(1), survey2.name, survey2.name2)).execute());
}
Also used : QSurvey(com.querydsl.sql.domain.QSurvey) Test(org.junit.Test) IncludeIn(com.querydsl.core.testutil.IncludeIn)

Aggregations

IncludeIn (com.querydsl.core.testutil.IncludeIn)11 Test (org.junit.Test)9 SQLMergeClause (com.querydsl.sql.dml.SQLMergeClause)4 ExcludeIn (com.querydsl.core.testutil.ExcludeIn)2 SQLInsertClause (com.querydsl.sql.dml.SQLInsertClause)2 QEmployee (com.querydsl.sql.domain.QEmployee)1 QSurvey (com.querydsl.sql.domain.QSurvey)1 UUID (java.util.UUID)1