Join does not work?

Hello, I nead some help with drizzle d1. I wrote something like this:
  const versionAlias = alias(schema.app_versions, 'version')
  const secondVersionAlias = alias(schema.app_versions, 'secondVersion')

  const test = drizzleCient.select().from(schema.channels)
  .innerJoin(versionAlias, eq(schema.channels.version, versionAlias.id))
  .leftJoin(secondVersionAlias, eq(schema.channels.secondVersion, secondVersionAlias.id))
  .limit(1)
  console.log('tesssss', test.toSQL(), await test)
and got something like this (see screenshot)

That is very bizarre because without this leftjoin everything works fine. I have absolutely zero idea how to debug this
image.png
image.png
Was this page helpful?