Skip to content

Commit 010fa42

Browse files
author
Marco Bunge
committed
Refactor connection
Fiy typo Fiy typo
1 parent db8ff50 commit 010fa42

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Hawkbit Database Changelog
22

3+
## 1.0.1
4+
5+
### Altered
6+
7+
- Add table alias feature to mapper
8+
- add table prefixing to gateway
9+
- map entities from identity map in select if any exists
10+
311
## 1.0.0
412

513
### Added

src/Connection.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ public function setPrefix($prefix)
5555
}
5656

5757
/**
58-
* @param $entityOrMapper
59-
* @return Mapper|AbstractMapper
58+
* @return UnitOfWork
6059
*/
61-
public function loadMapper($entityOrMapper){
62-
63-
return $this->getMapperLocator()->locate($entityOrMapper);
60+
public function createUnitOfWork(){
61+
return new UnitOfWork($this);
6462
}
6563

6664
/**
@@ -75,6 +73,15 @@ public function getMapperLocator()
7573
}
7674

7775

76+
/**
77+
* @param $entityOrMapper
78+
* @return Mapper|AbstractMapper
79+
*/
80+
public function loadMapper($entityOrMapper){
81+
82+
return $this->getMapperLocator()->locate($entityOrMapper);
83+
}
84+
7885
/**
7986
* @param $classOrObject
8087
* @return IdentityMap
@@ -95,11 +102,4 @@ public function loadIdentityMap($classOrObject)
95102
return $this->identityMap[$classOrObject];
96103
}
97104

98-
/**
99-
* @return UnitOfWork
100-
*/
101-
public function createUnitOfWork(){
102-
return new UnitOfWork($this);
103-
}
104-
105105
}

0 commit comments

Comments
 (0)