Skip to content

Commit 0a29dff

Browse files
committed
chapter 04: making getUnitOfWork public to use in the new file query.js, automatically all the clients of entityManager depend of this method too, regardless if they use it, can cause backward compatibility problems...
1 parent c90e001 commit 0a29dff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

chapter-04-the-interface-segregation-principle/entityManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function entityManager() {
1414
return {
1515
persist,
1616
flush,
17+
getUnitOfWork,
1718
};
1819
}
1920

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function Query(entityManager) {
2+
function someMethod() {
3+
entityManager.getUnitOfWork();
4+
}
5+
6+
return {
7+
someMethod,
8+
};
9+
}
10+
11+
module.exports = Query;

0 commit comments

Comments
 (0)