Skip to content

Commit 7600f44

Browse files
committed
Update README
1 parent 4bda9d5 commit 7600f44

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,18 @@ Conditions on frameworks which I choose for consideration:
5050
* Pros
5151
* Writing SQL statements in XML mapper file feels good - it's easy to work with parameters
5252
* Cons
53-
* Quite a lot of files for single DAO implementation
53+
* Quite a lot of files for single DAO implementation, DAO/Repository and XXXMapper and XXXMapper.xml
5454
* Can't run batch and non-batch operations in single SqlSession
55-
. Can't implement DDD
55+
* Too many XML mapper files.
56+
* Can't implement DDD
5657

5758
**EBean**
5859
* Pros
5960
* Everything looks very nice - all the scenarios are implemented by very readable code
6061
* Super simple batch operations (actually it's only about using right method :) )
6162
* Although there are methods which make CRUD operations and Querying super simple, there are still means how to execute plain SQL and even a way how to get the basic JDBC Transaction object, which you can use for core JDBC stuff. That is really good.
6263
* Cons
63-
* Not found any
64+
* DTO query do not support XML mapping
6465

6566
## Quick Start ##
6667

@@ -73,6 +74,8 @@ Examples: [spring-boot-data-ebean-samples](https://github.com/hexagonframework/s
7374
Table entity:
7475
```java
7576
@Entity
77+
@Getter
78+
@Setter
7679
public class User {
7780

7881
@Id
@@ -81,10 +84,6 @@ public class User {
8184
private String firstname;
8285
private String lastname;
8386
@Column(nullable = false, unique = true) private String emailAddress;
84-
85-
// Getters and setters
86-
// (Firstname, Lastname,emailAddress)-constructor and noargs-constructor
87-
// equals / hashcode
8887
}
8988
```
9089
Sql entity:

README_zh.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
* 优点
5858
* 在XML映射文件里写SQL语句很爽
5959
* 缺点
60-
* 实现一个DAO、仓储要写很多文件,方法多了比较繁琐
60+
* 实现一个DAO、仓储要写很多文件(DAO/Repository、XXXMapper、XXXMapper.xml),方法多了比较繁琐
6161
* 无法在一个方法里做批处理,无法级联加载
62+
* 即时是简单的CRUD,都显得繁琐,导致存在各种弥补mybatis这一缺陷的第三方封装框架
6263
* 无法面向对象,无法实现DDD
6364

6465
**EBean**
@@ -67,7 +68,7 @@
6768
* 实现批处理超级简单
6869
* ORM查询、sql查询、DTO查询都非常简单
6970
* 缺点
70-
* 还没发现
71+
* DTO查询功能较新,有待增加XML mapping对DTO的支持
7172

7273
## 快速开始 ##
7374

@@ -81,6 +82,8 @@
8182
表格实体:
8283
```java
8384
@Entity
85+
@Getter
86+
@Setter
8487
public class User {
8588

8689
@Id
@@ -89,10 +92,6 @@ public class User {
8992
private String firstname;
9093
private String lastname;
9194
@Column(nullable = false, unique = true) private String emailAddress;
92-
93-
// Getters and setters
94-
// (Firstname, Lastname,emailAddress)-constructor and noargs-constructor
95-
// equals / hashcode
9695
}
9796
```
9897
SQL实体:

0 commit comments

Comments
 (0)