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

Write to multi-attribute or to-many assoc adds instead of replacing #138

Open
Clashsoft opened this issue Sep 4, 2019 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@Clashsoft
Copy link
Member

Clashsoft commented Sep 4, 2019

There is a NumList with numbers 1,2,3.
We write 4,5,6 into numbers of numList.
// numList.numbers == [1,2,3,4,5,6]
@Clashsoft Clashsoft added the bug Something isn't working label Sep 4, 2019
@Clashsoft Clashsoft added this to the v0.9.0 milestone Sep 4, 2019
@Clashsoft Clashsoft self-assigned this Sep 4, 2019
@Clashsoft
Copy link
Member Author

There are two ways to achieve this behaviour:

  1. Generate a without call before with:

     numList.withoutNumbers(numList.getNumbers().toArray());
     numList.withNumbers(4,5,6);
    

    The problem is that too many property change events are fired when the old and new items have common items.

  2. Change https://github.com/fujaba/fulib to add a setNumbers method, which only creates events for items that are actually added and removed:

     NumList setNumbers(Integer... numbers) {
         // ...
         return this
     }
    

@Clashsoft Clashsoft removed this from the v0.9.0 milestone Sep 18, 2019
@Clashsoft Clashsoft added this to the v1.1.0 milestone Sep 28, 2019
@Clashsoft Clashsoft modified the milestones: v1.1.0, v1.2.0 Feb 17, 2020
@Clashsoft Clashsoft modified the milestones: v1.2.0, v1.3.0 Mar 3, 2020
@Clashsoft Clashsoft removed this from the v1.3.0 milestone Apr 17, 2020
@Clashsoft
Copy link
Member Author

Waiting for fujaba/fulib#11 / fujaba/fulib#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant