Custom Nested DB schema defaults or empty help

Field "objectiveIds" in model "Quest" can't be a list. The current connector does not support lists of primitive types. ?????? Objective and Quest are custom models here, one to many. How to many? Do I have to comma parsing? prisma + planetscale or should I do: objective Objective[] I miss my android room primitive lists and my wall of converters q.q
1 Reply
Kirik
Kirik17mo ago
create: privateProcedure .input( z.object({ content: z.string().emoji("Only emojis are allowed").min(1).max(280), }) ) .mutation(async ({ ctx, input }) => { const authorId = ctx.userId;
const { success } = await ratelimit.limit(authorId);
if (!success) throw new TRPCError({ code: "TOO_MANY_REQUESTS" });
const quest = await ctx.prisma.quest.create({
data: { authorId, title: input.content, rating: 1, rating_denominator:1, reward_xp:1, goal: "goal", target: new Date(), description: "description",


}, });
return quest; }),
Want results from more Discord servers?
Add your server