Status | COMPLETE |
---|---|
Impact | MEDIUM |
Driver | |
Approver |
|
Contributors | David Pribula, Slavomir Kocka |
Informed | |
Due date | |
Resources |
Background
https://micronaut.io/2019/07/18/announcing-micronaut-data/
Micronaut Data JDBC:
Micronaut Data JDBC / R2DBC is not an Object Relational Mapping (ORM) implementation and does not and will not include any of the following concepts:
Lazy Loading or Proxying of Associations
Dirty Checking
Persistence Contexts / Sessions
First Level Caching and Entity Proxies
Micronaut Data JPA:
TODO
Options considered
| Micronaut Data JDBC | Micronaut Data JPA |
---|---|---|
Description | ||
Pros and cons | better performance seemed to work better with Kotlin data classes less libraries needed missing features less sources to debug new to developers | well known across developers better debug possibilities less fear of the unknown more features worse performance doesn’t play nice with Kotlin data classes(although there are known workarounds) does not play nice with immutable model |
Estimated cost | MEDIUM | MEDIUM |
Action items
Outcome
The decision is to go with Micronaut Data JDBC. It is not so comprehensive as Hibernate/JPA, however we do not intend to make complex model in microservices. Also, as we would like to write code mainly with immutable kotlin data classes, this creates clash with Hibernate/JPA session concept. Also, Micronaut Data supports similar approach to Spring Data repository interfaces, it is still easy to go with.