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

Bug #766885 reported by Samppa Saarela
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?

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

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
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.