Trying to get relations from one table to another, as one-to-many but get only one value

I have a one-to-many relation on a table, and I want to get all the workoutResults associated with a workoutSession. My query looks like this:
      const qb = db
        .select()
        .from(workoutSession)
        // .leftJoin(event, eq(event.id, workoutSession.eventId));
        .leftJoin(
          workoutResult,
          eq(workoutSession.id, workoutResult.workoutSessionId)
        )


I don't understand why workoutSession.workoutResult is not an array, since there are many workoutResults with the same workoutSessionId I hope I'm clear enough.
I've also tried adding the .all() at the end of the query, but this does not seem to exist anywhere in drizzle 🤔
Was this page helpful?