long nested relation is exceeding 63 characters for Postgres

I have many relations that are named long and it's causing Postgres to truncate these long names when they are combined when querying too many nested relations
export const table1ToTable2Relations = relations(
table1ToTable2Relations,
({ one }) => ({
table1ToTable2: one(table2, {
fields: [table1ToTable2Relations.id],
references: [table2.id],
}),
}),
);
export const table1ToTable2Relations = relations(
table1ToTable2Relations,
({ one }) => ({
table1ToTable2: one(table2, {
fields: [table1ToTable2Relations.id],
references: [table2.id],
}),
}),
);
the amount of table1ToTable2 in the project is making an end query that contains many of the following as example: table1ToTable2_toTable3_table4_table6_table6ToTable7_table7 something like that which is surpassing the length allowed by Postgres I tried setting up the relationName to something short but it doesn't affect the end result query (still use the longer name) Any solution for this please? thanks!
1 Reply
hk
hkOP8mo ago
this is another example of the issue on github https://github.com/drizzle-team/drizzle-orm/issues/1378
Want results from more Discord servers?
Add your server