Open maritz opened 6 years ago
Maybe something like "typeAsNumeric" that adds a step after typecasting as well to additionally type the return of the behaviour to int/float.
This is especially useful for fields like createdAt which is usually defined as readOnly by making the behaviour always return the old value.
Currently when you define a property with type behavior, it will never use scored indexing for sorts.
This means that for example creating a createdAt behavior automatically means that sorting by it uses redis.sort with O(N+M*log(M)) instead of redis.zrange/zrevrange with O(log(N)+M).
This can be a significant performance issue.