Beanmapper v2.2.0 Release Notes

Release Date: 2017-11-01 // about 4 years ago
  • ๐Ÿ›  Fixed

    • ๐Ÿ’ฅ BREAKING CHANGE Issue #93, config() not threadsafe; it is possible for override configurations to be reused between threads, theoretically allowing fields to be changed before the map is called. This is not threadsafe. Now, nowhere is override configuration reused; it will always create a new override configuration. Both config() and wrapConfig() have been replaced with wrap(), which does the same as wrapConfig(). Internally, some OverrideConfiguration properties have been delegated to an OverrideField which takes care of returning the right value for a property. The clear() method has been removed; calling wrap automatically resets these properties (expect for downsize source/target, which are primarily used internally).
    • ๐Ÿ‘ป Issue #60, Unmatched BeanProperty did not throw an exception; properties annotated with BeanProperty must match. If they do not, an exception must be thrown. Due to a bug, this did not always occur (only with BeanProperty on the target side). The current mechanism keep tabs on matched properties and does a final verification. If unmatched properties remain that should have been matched, an exception is thrown. ### ๐Ÿ”„ Changed
    • ๐Ÿ‘‰ Issue #89, Use sensible implementation for Set; when a set is created an no preferredCollectionClass is passed, the handler will look at the collection element type. If the type is Comparable, it will return a TreeSet. If not, it will return a HashSet. ### โž• Added
    • 0๏ธโƒฃ Issue #90, Introduce a global flushEnabled, BeanCollection.flushAfterClear default true; a global flushEnabled setting has been introduced, which is false by default. The BeanCollection.flushAfterClear has changed from a default false to true. BeanMapper asserts that both settings must be true before flushing. BeanMapper Spring #28 sets flushEnabled=true when Lazy is used, because this offers the best chance of the EntityManager running in a transaction context.