tomhill
DTDrizzle Team
•Created by tomhill on 5/17/2024 in #help
orderBy in nested findMany
The docs suggest that I can order a nested findMany (https://orm.drizzle.team/docs/rqb#order-by)
Like so:
But when I attempt to do something similar:
I get the type error :
Object literal may only specify known properties, and orderBy does not exist in type
How can I orderBy an attribute in a nested query? The projectInfo is a one-to-one relation with projects. I want to order projects by projectInfo.name? Is there a way I can do this using the query
syntax?2 replies
DTDrizzle Team
•Created by tomhill on 5/9/2024 in #help
Table alias is greater than 63 bytes causes truncated identifier notice
I have a query:
which generates some SQL that alias the table name
soil_sample_analysis
to samplingRound_stratumSamplingRounds_soilSamples_soilSampleAnalysis
which is 66 bytes:
Because 66 > 63, I get this notice:
What are my options here for preventing this? I don't want to rename the table, as the individual tables themselves are a reasonable length. I also ideally don't want to just suppress the notice using the driver. I see this as an issue with drizzle as drizzle is generating this alias. Thanks for your help!2 replies