Hello guys, I am looking to `select` a substring t...
# random
t
Hello guys, I am looking to
select
a substring to not return the whole article in my blog database, how can I achieve this ? I tried this
Copy code
return prisma.article.findMany({
    orderBy: {
      createdAt: 'desc',
    },
    select: {
      createdAt: true,
      id: true,
      title: true,
      updatedAt: true,
      content: 'left(content, 15)' as any
    },
  });
but is says it's expecting
true
or
false
as a value. Thanks for the help 🙂
h
Hi @Timothee i think it's not possible for now as you are expecting , this issue is open : https://github.com/prisma/prisma/issues/7039 Similar problem is marked By Ryan here : https://stackoverflow.com/questions/68456665/how-can-i-include-custom-selects-in-my-queries/68456866#68456866 Hope it may help to understand.
n
Just shared my thoughts on that 🙂 https://stackoverflow.com/a/68469863/5996699
t
Thank you guys, it's actually my question 😄
😄 1