当前位置:网站首页>ORM common requirements
ORM common requirements
2022-07-25 22:24:00 【Who is Huang Huang】
One .ORM Common requirements in the framework
ORM Common requirements in the use of framework
- When the back management system makes a query , Multiple conditions are queried through an interface , Add a paragraph to whatever field you bring sql Filter , adopt mybatis How to achieve ?
adopt mybatis Of dynamic sql It can be realized , similar getEmpsByCondition, Which field is carried , The query condition takes the value of this field
It seems that only by writing mapper xml To make logical judgments
spring data jpa It's through multiple Predicate structure Specification establish where Conditions of the , Logic is controlled by code
2 Automatically set the creation time / Update time
mybatis Is also used metaObjectHandler To do it ?
Or do it through interceptors ?
Or just create these two fields , Control through database statements ?
spring data jpa There is entityListener, You can not operate the database , To achieve this function
3. Automatic field encryption and decryption ?
I don't know how to realize automation
stay mybatis in , Do obfuscation after the query
stay spring data jpa in , Use entityManager Do obfuscation after the query - Optimistic lock function
mybatis-plus Provides optimistic-lock plugin
spring data jpa Also provided @version Annotation to do - Logical deletion
mybatis-plus Logical deletion is placed in DefaultSqlInjector Medium
spring data jpa Write by yourself sql To achieve logical deletion
Two . The realization of requirements
边栏推荐
- Victoriametrics single node of kubernetes
- synchronized与volatile
- [assembly language 01] basic knowledge
- QML module not found
- [database learning] redis parser & single thread & Model
- Gan, why '𠮷 𠮷'.Length== 3 ??
- 科大讯飞智能办公本Air电纸书阅读器,让我的工作生活更加健康
- Xiaobai programmer day 8
- PySpark数据分析基础:pyspark.sql.SparkSession类方法详解及操作+代码展示
- ThreadLocal summary (to be continued)
猜你喜欢

Use of hyperlinks

数据质量:数据治理的核心

Title: give a group of arrays, arranged from large to small and from small to large.

Xiaobai programmer day 8
![[assembly language 01] basic knowledge](/img/df/d586288b8f41211141bc4e2bca20cf.png)
[assembly language 01] basic knowledge

ML-Numpy

对需求的内容进行jieba分词并按词频排序输出excel文档

Data governance under data platform

It's over. I went to work for three months and became bald

MySQL - subquery - column subquery (multi row subquery)
随机推荐
D3.js learning
2day
torchvision
SQL基本语句 DQL select与提取 DML插入删除
Common source code for ArcGIS development
synchronized与volatile
SQL中in的用法 DQL 查询
Some summary about function
xxl-job中 关于所有日志系统的源码的解读(一行一行源码解读)
mysql: error while loading shared libraries: libncurses.so. 5: cannot open shared object file: No suc
Imitation Tiktok homepage interface
数据库进阶·如何针对所有用户数据中没有的数据去加入随机的数据-蜻蜓Q系统用户没有头像如何加入头像数据-优雅草科技kir
Wkid in ArcGIS
点亮字符串中所有需要点亮的位置,至少需要点几盏灯
What is partition and barrel division?
3dslicer import cone beam CT image
访问者模式(visitor)模式
Randomly generate 10 (range 1~100) integers, save them to the array, and print the array in reverse order. And find the average value, the maximum value and the subscript of the maximum value, and fin
If jimureport building block report is integrated according to the framework
Three ways to allocate disk space