-
Notifications
You must be signed in to change notification settings - Fork 20
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
resave error #83
Comments
Hi @decifris, Thanks for posting this. I've just posted a new release (3.1.4) that will prevent a crash in this circumstance, while still allowing the error to surface and be accessed via a callback function parameter (see notes for issue #82, here). However, the underlying cause of the specific crash above remains unclear... From the log output, it looks like Prisma is complaining about an
I'm guessing the underlying issue is a Will leave this open for a bit, to see if new knowledge accumulates... |
I don't have any particular new knowledge, but I can repro this issue. I always figured this was a purposeful thing (unable to edit the It is possible that the outcome changes depending on which database provider you are using? |
What I have found is that if you define your model in such a way that id and sid are unique, but neither are the table's primary key, the library performs as expected, at least in being able to bypass this error, will continue to monitor.
|
@SunburntRock89 - thanks for the info.
I've mainly used postgres - so not sure about this... Are you seeing this with a db other than postgres?
Good to know; thanks for this "clue". |
Apologies, didn't get an email about this. |
Alright so after some minor digging I've discovered that this is specifically a Mongo issue. When attempting to modify _id in Studio 3T
The big key here is I'm not 100% on the architecture of this library, but does the id field absolutely need to be edited? |
This fixes issue kleydon#83 and should provide proper MongoDB support.
## [3.1.7](v3.1.6...v3.1.7) (2022-06-25) ### Bug Fixes * remove immutable id field from query for MongoDB ([ba39bc1](ba39bc1)), closes [#83](#83)
I'm 99.9% sure it shouldn't be - at least, it shouldn't be without also changing Good idea (I think) to make I believe the fix (PR #96) addresses this bug; closing for now. |
Hello, I edited the session and I got this error, precisely I edited the "resave" property, this is the session:
app.use( session({ secret: "secret", resave: true, saveUninitialized: false, cookie: { maxAge: 20 * 1000, }, store: new PrismaSessionStore(new PrismaClient(), { checkPeriod: 2 * 60 * 1000, //ms dbRecordIdIsSessionId: true, dbRecordIdFunction: undefined, }), }), );
This is the error:
The text was updated successfully, but these errors were encountered: