st-tu-dresden / salespoint

A framework to develop point of sales applications, powered by Java and Spring Boot
https://tu-dresden.de/ing/informatik/smt/st/forschung/forschungsprojekte/salespoint
Apache License 2.0
178 stars 49 forks source link

Make it clear how to persist updated `AccountancyEntry`s #412

Closed martinmo closed 1 year ago

martinmo commented 1 year ago

In Accountancy, the add(…) method currently has two purposes: 1) adding a new entry and 2) updating/saving an existing entry. However, the latter purpose isn't clear to Salespoint framework users, neither from the method name (i.e., something like save(…) would be better) nor from the javadoc. The AccountancyEntryRepository, which has a save(…) method, is package private.

odrotbohm commented 1 year ago

AccountancyEntry instances are supposed to be immutable (as that's how bookkeeping works), so I guess we need to make sure we don't write any non-new entries.