Skip to content

Conversation

@labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Sep 27, 2024

Rationale

Currently, PropertyMap is a mutable Map that also offers delete(), save(), etc., even for property maps that should be read-only. This is poor practice and has led to caching issues and bugs like https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=48993

A better approach is to make PropertyMap read-only (immutable) and introduce WritablePropertyMap, which allows map mutation (e.g., put(), remove()) and implements delete(), save(), etc. Property maps are used in many repositories, so this initial PR introduces the new class without yet splitting out our persistence methods. Once all repos are converted to use the new class we'll move those methods.

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.

3 participants