Skip to content

Commit 80d58ed

Browse files
author
bretislav.wajtr
committed
Fixed several typos
1 parent 49a4c99 commit 80d58ed

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Please note that following remarks are very subjective and does not have to nece
105105
* Pros
106106
* Writing SQL statements in XML mapper file feels good - it's easy to work with parameters.
107107
* Cons
108-
* quite a lot of files for single DAO imlementation (MyBatisDataRepositoryImpl, DataRepositoryMapper and DataRepositoryMapper.xml), though navigation is not such a big deal
108+
* quite a lot of files for single DAO implementation (MyBatisDataRepositoryImpl, DataRepositoryMapper and DataRepositoryMapper.xml), though navigation is not such a big deal
109109
* at version 3.4.0 unable to work with Java8 DateTime types (LocalDate etc.), support possible through 3rd party library (mybatis-types), see build.gradle and <typeHandlers> configuration in mybatis-config.xml
110110
* can't run batch and non-batch operations in single SqlSession, but have to create completely new SqlSession instead (see configuration in DbTestsApplication class). Surprisingly, this does not necessarily mean that the batch and non-batch operations will be executed in different transactions (as we would expect), so at the end this is not a total drawback, but just inconvenience
111111
* expected that localCacheScope=STATEMENT is default MyBatis behavior, which is not... I know this is questionable drawback, but it was kind of surprise for me, see mybatis-config.xml
@@ -118,7 +118,7 @@ Please note that following remarks are very subjective and does not have to nece
118118
* Cons
119119
* Necessity to write the entities (I mean @Entity classes) - it would be cool to have some generator for it
120120
* Necessity of "enhancement" of the entities - this was quite surprising for me - but actually it's basically only about right environment setup (IDE plugin and Gradle plugin) and then you don't have to think about it
121-
* Online documentation is quite weak (as of December 1, 2016). Lot of things are hidden in videos and you have to google for details or get into JavaDocs... Hoverwer, JavaDoc is very good and I generally didn't a problem to find what I need in JavaDoc. Also the API is quite understandable... at the end weak online documentation is not such a big deal.
121+
* Online documentation is quite weak (as of December 1, 2016). Lot of things are hidden in videos and you have to google for details or get into JavaDocs... However, JavaDoc is very good and I generally didn't have a problem to find what I needed in JavaDoc. Also the API is quite understandable... to sum it up, that weak online documentation is not such a big deal.
122122
* Logging could be better
123123
* Allows JPA OneToMany and ManyToOne relations modeling and possibility to "lazy fetch" these relations - actually I do not like this concept at all as it can lead to potentially very ineffective code. Per documentation and experiences of several people on internet EBean behaves better than full blown JPA implementation in this manner, but you can still be hit by the N+1 problem and all the performance traps, which lazy fetching brings...
124124

src/main/java/com/clevergang/dbtests/DbTestsApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public SqlSession myBatisDefaultSession(SqlSessionFactory sqlSessionFactory) {
6565
@Bean
6666
@Qualifier("batch-operations")
6767
@SuppressWarnings("SpringJavaAutowiringInspection")
68-
public SqlSession myBatisBatchOperationstSession(DataSource dataSource) throws Exception {
68+
public SqlSession myBatisBatchOperationsSession(DataSource dataSource) throws Exception {
6969
/*
7070
NOTE: Unfortunately, in MyBatis it's not possible to execute batch and non-batch operations in single SqlSession.
7171
To support this scenario, we have to create completely new SqlSessionFactoryBean and completely new

src/main/java/com/clevergang/dbtests/repository/impl/ebean/EBeanDataRepositoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public List<Integer> insertProjects(List<Project> projects) {
175175
// following:
176176
// ebean.currentTransaction().getBatch() == PersistBatch.NONE
177177
// ebean.currentTransaction().getBatchOnCascade() == PersistBatch.ALL
178-
// so basically when you do sigle insert (ebean.save()) then batching is not used. But when
178+
// so basically when you do single insert (ebean.save()) then batching is not used. But when
179179
// use use ebean.saveAll, then value for BatchOnCascade is used for storing the value and in
180180
// our case that's PersistBatch.ALL -> batching is used.
181181
// That means, for default settings:

src/main/resources/mybatis/mybatis-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<settings>
77
<!-- Actually default setting localCacheScope=SESSION is quite unexpected behaviour, at least for me ;) -->
88
<!-- I would advice to solve caching (even for session scope) by spring annotations - to better control what is cached. -->
9-
<!--Setting localCacheScope to STATMENT -> this way it's ensured that every call to MyBatis WILL go to database and fetch new results EVERYTIME -->
9+
<!--Setting localCacheScope to STATEMENT -> this way it's ensured that every call to MyBatis WILL go to database and fetch new results EVERYTIME -->
1010
<setting name="localCacheScope" value="STATEMENT"/>
1111
</settings>
1212
<typeHandlers>

0 commit comments

Comments
 (0)