Ok, I think I pinpointed the issue.
Just a quick reply : you're brilliant, you've completely pinpointed it
The lines modified in InventoryArtifact.cs have a small comment just above it :
- Code: Select all
// We want a new copy from the DB to avoid everyone sharing the same template
This is completely what I explained about cache !
I modified this line with the new API using FindObjectByKey instead of "Select with where clause", this was logic because the previous where clause was using the Primary Key for which we have specific methods that can take advantage of caching features !!
This line was intentionally using an un-optimized query to trigger side effect in Database Handler thus resulting in a new instanced object whatever the table caching status is...
This is what angers me about DOL, we can't rely on changing underlying implementations when most Code expect specific side effect to work !
We shouldn't revert this modification or the next time Database Handler move to another implementation we'll run into this bug again...
I think this specific artifact code should use the "Clone()" method to make sure he is handling a non-shared (or new...) DataObject instance, this would be more implementation agnostic