sqlstruct icon indicating copy to clipboard operation
sqlstruct copied to clipboard

Naming bug on doScan()

Open madshov opened this issue 6 years ago • 2 comments

Line name = strings.Replace(name, alias+"_", "", 1) in doScan() causes an issue if alias+"_" is part of the column name. Eg. column name: "order_id", alias "r" will produce "ordeid" and hence fail. For now make sure your alias+"_" is not part of a column name.

madshov avatar Nov 05 '18 15:11 madshov

Are you using ColumnsAliased to generate your column names?

kisielk avatar Nov 08 '18 22:11 kisielk

Yes I am using ColumnsAliased, ex. sqlstruct.ColumnsAliased(o, "r") will produce the error if a column is called order_id.

madshov avatar Mar 07 '19 18:03 madshov