mysema/querydsl — pull request #707 by TuomasKiviaho (2014-04-10 06:32:02+00:00)
Title: Support for ORDINAL_POSITION metadata

Ordinal position is used instead of columns names when combining INSERT INTO / CREATE TABLE and SELECT clauses (http://stackoverflow.com/questions/9807724/does-insert-into-select-always-match-fields-by-ordinal-position) when explicit column name mapping is not provided.

New ColumnMetaData methods getIndex() and fluent withIndex() counterpart make it possible to utilize ordinal positions.

New metadata serializer property (with additional ANT/Maven support) columnComparatorClass makes use of it by reordering the RelationalPath getColumns() optionally already at compile time. For backwards compatibility the current alphabetical order is preserved when no comparator is present.