-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(prisma): adjust test to validate upsert with id #1446
Conversation
WalkthroughThe pull request modifies the Changes
The changes are minimal and focused on adjusting the test case's setup and expected behavior for the upsert operation. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (1)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@steebchen Strange enough, it works on CI, but not on my side. This is what I get when I execute the test: |
yeah that's why I opened the PR to check if that's the case, I'm not sure why there is a diff; although the version is maybe too broadly defined in the compose.yml; however if there is really a breaking change it should also affect CI 🤷 actually it looks more like a prisma issue, which is also weird as the version is hardcoded |
@steebchen Tests were run again, we do now have that issue with |
Ah yah that explains a lot. Was the same CI issue I mentioned. For the actual MongoDB issue, I think the Prisma engine just doesn't accept; maybe this is also a MongoBD restriction. I see in the docs that they say to use $set, which is also why there is some extra code for MongoDB in the .Update. We would need to do more research I guess; alternatively we add the CreateOrUpdate() function only for SQL-like databases. |
Yeah, I think for now it's fine to not have it, ideally it would not compile but I'm not sure if it's worth to refine the interfaces as it always adds more complexity. For the CreateOrUpdate in the other PR, the tricky thing is that the ID field may have any name, so we would need to filter out keys which we could get from the schema but I'm also not sure if that's worth the effort. |
I guess we can close this pull request then, since we now know that having an |
yep indeed. feel free to open another PR for the CreateOrUpdate function. |
Summary by CodeRabbit