SaFi Bank Space : Database Access Toolkit

Status

COMPLETE

Impact

MEDIUM

Driver

Approver

 

Contributors

 David Pribula, Slavomir Kocka

Informed

Due date

Resources

(blue star) Background

https://micronaut.io/2019/07/18/announcing-micronaut-data/

Micronaut Data JDBC:

  • How Micronaut Data Works

  • Micronaut Data With SQL

  • 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

(blue star) Options considered

 

Micronaut Data JDBC

Micronaut Data JPA

Description

Pros and cons

(plus) better performance

(plus) seemed to work better with Kotlin data classes

(plus) less libraries needed

(minus) missing features

(minus) less sources to debug

(minus) new to developers

(plus) well known across developers

(plus) better debug possibilities

(plus) less fear of the unknown

(plus) more features

(minus) worse performance

(minus) doesn’t play nice with Kotlin data classes(although there are known workarounds)

(minus) does not play nice with immutable model

Estimated cost

MEDIUM

MEDIUM

(blue star) Action items

  •  

(blue star) 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.