Skip to content
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

Fix PocoData Cache Issue #711

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

Curlack
Copy link
Contributor

@Curlack Curlack commented Nov 3, 2023

Include Mapper Type in cache key for PocoData. Fixes #517.

Avoid "duplicate key" side effect in PocoData.ForObject method when handling dynamic objects.

PetaPoco/Core/PocoData.cs Outdated Show resolved Hide resolved
PetaPoco/Core/PocoData.cs Outdated Show resolved Hide resolved
PetaPoco/Core/PocoData.cs Outdated Show resolved Hide resolved
PetaPoco/Core/PocoData.cs Outdated Show resolved Hide resolved
Include Mapper Type in cache key for PocoData. Fixes CollaboratingPlatypus#517
Avoid "duplicate key" side effect in PocoData.ForObject method when handling dynamic objects.
@asherber
Copy link
Collaborator

asherber commented Nov 6, 2023

@pleb I think this is ready for your review. Read the conversation thread only if you dare!

The gist is:

  1. Add the mapper type to the PocoData cache key (as discussed in PocoData.ForType() caching #517)
  2. Make the guard clause for dynamics in PocoData.ForObject() case insensitive, to avoid needless "duplicate key" error
  3. Add a null propagator to the guard clause in Database.SetParameterProperties(), again to avoid needless errors with dynamics

@pleb pleb merged commit 81b990f into CollaboratingPlatypus:development Nov 6, 2023
1 check passed
@Ste1io
Copy link
Collaborator

Ste1io commented Nov 7, 2023

Oh snap, you're committed now @Curlack! 🤣

PetaPoco Committed 02

Congrats on your first merge man.

@Curlack
Copy link
Contributor Author

Curlack commented Nov 7, 2023

Thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PocoData.ForType() caching
4 participants