Reference key display issue

Hello @JeremyV :wave:

I have found the origin of the issue.

I made a copy of your model to perform some tests. I have identified that some queries from sequelize have a really long identifier such as ... AS "integrationBudgetIntegrationBudgetEntries.repartitionKey.displayName" .... In the previous example, the identifier is 68 characters long, which goes beyond the limit permitted by postgresql.

By default postgresql has a default identifier length (which is 63, you can find more info here). It is impossible to change it, unless you recompile the postgres lib on your own.

Querying on your database with deep level of inclusion, and naming tables/fields with long names leads to the limit being reached.

To tackle this, I would suggest to change the alias set on IntegrationBudgetEntries -> repartitionKeys. It is currently aliased with repartitionKey you can put whatever you want (tested with rk on my end).

Can you confirm that this works for you please ?

Steve.

2 Likes

Very clever @Steve_Bunlon, I’ll test that and let you know.

NB : it works indeed. Many thanks.

1 Like