Skip to content

Duplicate column alias #1969

@awn70

Description

@awn70

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[x] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native

TypeORM version:

[ ] latest
[x] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

The buildColumnAlias function in SelectQueryBuilder tends to return duplicate column alias names. If the columnAliasName is more than 29 chars long you get the table alias and 2 chars from the column name:
e.g. MyLongTableOrClassName_MyLongColumnName -> MyLongTableOrClassName_MY

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions