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

Clean up the API of EntityUpdate #636

Closed
andrus opened this issue Jun 26, 2023 · 0 comments
Closed

Clean up the API of EntityUpdate #636

andrus opened this issue Jun 26, 2023 · 0 comments
Milestone

Comments

@andrus
Copy link
Contributor

andrus commented Jun 26, 2023

Let's clean up EntityUpdate API. Different parts of the update object (attributes, relationship ids, object id) have inconsistent method names for accessing and changing the data. We need to aligh them. Also should probably ensure that internal maps are created lazily to lighten the objects.

Upgrade Notes

EntityUpdate internal collections are no longer directly mutable, so trying to do something like update.getAttributes().put("a", 1) would result in the following exception:

java.lang.UnsupportedOperationException
    at java.base/java.util.AbstractMap.put(AbstractMap.java:209)

Instead, you should be using the new mutator methods, such as update.setAttribute("a", 1).

andrus added a commit that referenced this issue Jun 27, 2023
andrus added a commit that referenced this issue Jun 27, 2023
andrus added a commit that referenced this issue Jun 27, 2023
* lazy init of EntityUpdate collections
@andrus andrus added this to the 5.0.M17 milestone Jun 27, 2023
@andrus andrus closed this as completed Jun 27, 2023
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

No branches or pull requests

1 participant