Support for InsertClause.set(path, value) in select-based inserts

Bug #766885 reported by Samppa Saarela on 2011-04-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

When using insert.columns(...).select(subquery.list(...)) we lose static typing and maintaining this index-based column-value mapping is error prone. Could InsertClause be given a (sub) query as a constructor parameter and then when setting column values projection and insert values -list would be populated under the hood?

Supported now via additional constructor in SQLInsertClause :

        SQLInsertClause insert = insert(survey, sq().from(survey2));
        insert.set(survey.id, survey2.id.add(20));
        insert.set(survey.name, survey2.name);

Changed in querydsl:
status: New → Fix Committed

Released in 2.2.0-beta4

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers