I think I narrowed it down. The problem comes from the alias generation. IIUC, the algorithm takes the first non-letter (including '_') characters and adds some "uniqueing" info at the end. In this particular case, the columns "id1" and "id2" share the same prefix "id" and the same uniqueing info is added as a suffix. The same alias is then generated for 2 different columns.
|