multiSchema error: Error validating model "Session": This model is missing an `@@schema` attribute.
Trying to use
multiSchema
feature in the Prisma file to organize the models.
Looks like Wasp has some internal models that do not have @@schema
tagged. Wondering what is the work around? Is there a way we can pass the schema
to be used for the internal models? Or any other work around ?2 Replies
Hi @GK Palem. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, I don't have enough specific details to directly address your question about using the
multiSchema
feature with Wasp and Prisma. However, I can provide some relevant context and potential considerations:
1. Wasp currently assumes it works with Prisma 4, not Prisma 5, which might lead to compatibility issues with newer Prisma features Discord support thread (https://discord.com/channels/686873244791210014/1097604882011267102).
2. There's an ongoing effort to expand Wasp's Prisma support, including support for enum
and type
declarations, but multiSchema
is not specifically mentioned Github Issue (https://github.com/wasp-lang/wasp/issues/641).
3. Wasp is considering allowing customization of Prisma's datasource
declaration and enabling the use of Prisma's preview features Github Issue (https://github.com/wasp-lang/wasp/issues/1397).
Given this context, it seems that Wasp might not fully support the multiSchema
feature yet. As a workaround, you might consider:
1. Checking if you're using the latest version of Wasp, as newer versions might have better Prisma compatibility.
2. Reaching out to the Wasp community or developers directly through their Discord or GitHub issues for a specific solution or timeline for multiSchema
support.
3. Consider temporarily avoiding the use of multiSchema
until full support is implemented in Wasp.
Remember that modifying internal Wasp files is not recommended Discord support thread (https://discord.com/channels/686873244791210014/1204021576979324949), so trying to manually add @@schema
to internal models might lead to other issues.
For the most up-to-date information, I'd recommend checking the latest Wasp documentation or reaching out to the Wasp community directly.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @GK Palem, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@GK Palem hm so that is correct, our internal models don't have @@schema specified, and we currently don't have a way to specify it. I have t oadmit I don't know a lto about multischema yet, but I assumed it would just put models without @@schema under default schema. But that is not the case and it complains? Can you give me a bit of an idea how you are using multischema, how are you organizing your scjhema, and to which schema would you add Wasps' models like Session?