What's wrong with using jpa for one project but using native sql for all?

clipboard.png

A project is all native sql like this. Ah,

Mar.16,2021

it's okay to use sql in some scenarios, but if you use it all, why not use a lighter framework? For example, mybatis


is fine, but at most it is troublesome. Paste and copy.


so hard-code in the code. It's very invasive.

  1. if you need to change the sql. The source code must be modified.
  2. after modification, you must also republish
  3. is highly coupled, mixing sql and java code together. Poor readability
Menu