嵌套对象查询到 Prisma 中的单个数组
Nested objects queries into single array in Prisma
在 Prisma 文档中,我发现 this 查询:
我想得到而不是 posts: [ { title: 'My first post' }, { title: 'How to make cookies' } ]
,我得到 posts: ['my first post', 'how to make cookies']
这在 Prisma 中是不可能直接实现的。您需要获取数据,然后根据需要在您的应用程序中映射它。
在 Prisma 文档中,我发现 this 查询:
我想得到而不是 posts: [ { title: 'My first post' }, { title: 'How to make cookies' } ]
,我得到 posts: ['my first post', 'how to make cookies']
这在 Prisma 中是不可能直接实现的。您需要获取数据,然后根据需要在您的应用程序中映射它。