Need help making a drizzle query

I have the following schema
export const userTable = createTable("user", {
  id: int("id", { mode: "number" }).primaryKey({ autoIncrement: true }),

  pictureKey: text("picture_key").references(() => nameTable.key),
  signatureKey: text("signature_key").references(() => nameTable.key),
})


export const nameTable = createTable("name", {
  key: text("key", {length:256}).unique().primaryKey().notNull(),
  url: text("url").notNull(),
})

How do I select user and join the picture and signature?

I cant seem to have both picture and signature in one object.
Solution
Forgot to add the relations
Was this page helpful?