Skip to content

1.7.0

Latest
Compare
Choose a tag to compare
@angryziber angryziber released this 12 May 07:59
· 5 commits to main since this release

Note: this release contains small backwards-incompatible changes that may need adjusting in some projects, see below:

  • core: TSIDGenerator can now be used with custom classes outside TSID companion
  • core/jdbc: Any.toValues()/BaseCrudRepository.persister() will now return KProperty1 keys, not Strings for added type-safety.
    • If you need to use String keys, use toValues().mapKeys { it.key.name }
    • You may get "column specified more than once" errors if you have code like entity.toValues() + ("hello" to 123), replace "hello" with Entity::hello in that case
    • It is now recommended to use toValues() for both providing values and skipping them, e.g. entity.toValues(Entity::field1 = "other value, skip = setOf(Entity::field2)) - this avoids creation of intermediate maps and is faster
    • PropValue type alias now accepts 2 type arguments, so replace usages of PropValue<T> with PropValue<T, *>
  • json: toJsonValues() introduced for the cases when you want to modify how an entity is serialized into json (e.g. remove some keys)
  • jdbc: introduce @Column annotation to override DB column names for entity fields, previous internal typealias Column renamed to ColName
  • jdbc: make it possible to override how Enum/Array is stored using JdbcConverter, default to toString() for enums
  • jdbc: db.upsert() will now work as SQL MERGE for non-Postgres databases
  • server: use<>() call will fail if called inside context {} for Extensions that need Server-level initialization
  • server: allow body in DELETE requests, as sometimes people do that #117
  • json: improved detection if inline classes should be rendered as their value type or a string
  • jackson: DeserializationFeature.FAIL_ON_TRAILING_TOKENS is now enabled by default
  • smtp: SmtpEmailSender will now log the successful email sent (to address and subject)
  • openapi:
    • skip @AttrParam from OpenAPI spec
    • allow specifying SwaggerUI config parameters in openApi() function
    • skip @ApiResponse responseCode=default