cycle/orm

๐Ÿ› Automatic table aliases do not enter the postgres limit (63 bytes)

roquie opened this issue ยท 0 comments

No duplicates ๐Ÿฅฒ.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

SQLSTATE[42712]: Duplicate alias: 7 ERROR:  table name \"longtablename1_longtablename2_longtablename3_thispartwastruncatedbypostgres\" specified more than once

Possible solution 1:

I can use table aliases when I select records from repository with loadand with methods but I can't set up an alias for orderBy/Where clause for an entity attributes.

Possible solution 2 (correct):

ORM can use non-human-friendly aliases like t1, t2, t3 ... etc

Version

ORM 2.2.0
PHP 8.1