I am trying to call a stored procedure using prism...
# orm-help
c
I am trying to call a stored procedure using prisma. It is returning data, but the object in the result list doesn’t have the appropriate column names as key. My code looks something like this:
Copy code
const result = await this.prisma.$queryRaw<
      Prisma.categorySelect[]
    >`CALL catalog_get_categories_for_product(${productId})`;

    return result;
The returned result looks like this:
Copy code
[
  {
    "f0": 1,
    "f1": 1,
    "f2": "French"
  }
]
What I am expecting:
Copy code
[
  {
    "category_id": 1,
    "department_id": 1,
    "name": "French"
  }
]
Does anyone have an idea why the column names are not being returned correctly?
đź‘€ 1
@janpio do you have any thoughts on this?
j
Not really, besides that you can create an issue with a reproduction (including the code to create this stores procedure) and we would take a look.
110 Views