Comments (2)
你好
文档中所指的"ORM风格" 大致是 文档 的风格.
即, 操作由 Record 而非 Query 去执行.
这种, 可以触发 creating 和 created 等定义事件.
根据你的示例代码, 大致是如下的形式:
// 先获取新的 record
Record<UserData , Long> record = userDataModel.newRecord();
// 此处不应使用 toObject() 获取具体泛型对象
UserData userData = record.getEntity();
// 设置属性
userData.setNumber("123456");
// 保存
record.save();
文档中对此的表述, 会加以改进.
from database-all.
在 5.2.0 中, 修改了定义事件的相关的方法名, 使之更不易混淆
详见 文档
from database-all.
Related Issues (20)
- 请问什么时候添加findOrNew,firstOrNew,firstOrCreate,updateOrCreate等相关函数 HOT 13
- 希望尽量和Eloquent设计的api保持一致,这样有助于使用过Eloquent的人,更简单的上手,也不容易引起歧义。 HOT 9
- 实体为LocalDateTime时在2.9.0查询报错 HOT 13
- whereIn 查询时参数为空size为0时是否不应该执行这个in拼接 HOT 2
- maven package error HOT 2
- Springboot TransactionManager 报错 HOT 5
- 能不能添加@Transient类似的可以跳过某一个字段的实体,在数据库更新或者插入的时候不赋值。 HOT 2
- 能不能参考已经有的比如com.microsoft.sqlserver.jdbc.SQLServerDriver支持一下GraalVM构建呢 HOT 3
- generator的时候model里面会有两个import HOT 1
- 请问 为什么在我的项目中(springboot)一加上belongsto就要报错 HOT 1
- 你好,请问为什么我使用关联关系的时候会报这个错误。是我哪里没有配置对吗? HOT 4
- 请问可否支持重写关联关系? HOT 5
- 使用record.getEntity()时会报 WARN java.lang.NullPointerException HOT 5
- 直接使用实例化Model对象, 报 NoSuchMethodException QueryBuilderConfig.<init>() HOT 1
- paginate分页的时候如果有select语句会报sqlRuntimeException HOT 1
- springboot中使用了mybatis后再引入gaarasonORM无配置情况下事务不指定执行器会报错 HOT 2
- 我感觉这个框架不应该叫这个名字,应该叫MyBatis什么的,比如隔壁的MyBatis-flex现在就感觉人气不错 HOT 2
- 求指点,我连快速开始都跑不动。。 HOT 9
- 天呐, 这个关联关系也太好用了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from database-all.