Repository navigation
v1.23.0
-
reflection_factory:^2.11.0→^2.12.0, with reflection regenerated:
its generated constructorinvokers call constructors directly instead
of throughFunction.apply. -
Optimization:
ClassReflectionEntityHandler.instantiateFromMapImpl
resolves the values up front, with the same
Json.defaultFieldValueResolver(by each field's type), and calls
createInstanceFromMap(valuesResolved: true): constructors are called
straight from the map, withoutreflection_factory'sMethodInvocation
building. The resolver path is used as before when the map has a key that
isn't a field (e.g. a constructor parameter with another name), when a
constructor parameter named as a field has another type than the field,
or when a value doesn't resolve synchronously (or resolves tonull).- Users benchmark (SQLite), alternated with 1.22.0:
user/list+17–20%,
user/byState+12–18%,user/byId+12–15%.
- Users benchmark (SQLite), alternated with 1.22.0:
-
Fix:
Json.defaultFieldValueResolverresolves:- An
EntityReferenceList<T>field or parameter from a list of IDs,
entities or entities maps (as anEntityReferenceList<T>). It gave a
List, so instantiating with such a value failed. - A
Set<T>field or parameter from a list or a set (as aSet<T>, with
its elements resolved as aList<T>). It gave aList. TypeInfo.toEntityReferenceList: also from entities in an untyped
List(e.g.List<dynamic>).
- An