@@ 109-129 (lines=21) @@ | ||
106 | * |
|
107 | * @return ChildTask|array|mixed the result, formatted by the current formatter |
|
108 | */ |
|
109 | public function findPk($key, ConnectionInterface $con = null) |
|
110 | { |
|
111 | if ($key === null) { |
|
112 | return null; |
|
113 | } |
|
114 | if ((null !== ($obj = TaskTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { |
|
115 | // the object is already in the instance pool |
|
116 | return $obj; |
|
117 | } |
|
118 | if ($con === null) { |
|
119 | $con = Propel::getServiceContainer()->getReadConnection(TaskTableMap::DATABASE_NAME); |
|
120 | } |
|
121 | $this->basePreSelect($con); |
|
122 | if ($this->formatter || $this->modelAlias || $this->with || $this->select |
|
123 | || $this->selectColumns || $this->asColumns || $this->selectModifiers |
|
124 | || $this->map || $this->having || $this->joins) { |
|
125 | return $this->findPkComplex($key, $con); |
|
126 | } else { |
|
127 | return $this->findPkSimple($key, $con); |
|
128 | } |
|
129 | } |
|
130 | ||
131 | /** |
|
132 | * Find object by primary key using raw SQL to go fast. |
@@ 129-149 (lines=21) @@ | ||
126 | * |
|
127 | * @return ChildUser|array|mixed the result, formatted by the current formatter |
|
128 | */ |
|
129 | public function findPk($key, ConnectionInterface $con = null) |
|
130 | { |
|
131 | if ($key === null) { |
|
132 | return null; |
|
133 | } |
|
134 | if ((null !== ($obj = UserTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { |
|
135 | // the object is already in the instance pool |
|
136 | return $obj; |
|
137 | } |
|
138 | if ($con === null) { |
|
139 | $con = Propel::getServiceContainer()->getReadConnection(UserTableMap::DATABASE_NAME); |
|
140 | } |
|
141 | $this->basePreSelect($con); |
|
142 | if ($this->formatter || $this->modelAlias || $this->with || $this->select |
|
143 | || $this->selectColumns || $this->asColumns || $this->selectModifiers |
|
144 | || $this->map || $this->having || $this->joins) { |
|
145 | return $this->findPkComplex($key, $con); |
|
146 | } else { |
|
147 | return $this->findPkSimple($key, $con); |
|
148 | } |
|
149 | } |
|
150 | ||
151 | /** |
|
152 | * Find object by primary key using raw SQL to go fast. |
@@ 114-134 (lines=21) @@ | ||
111 | * |
|
112 | * @return ChildSelfprice|array|mixed the result, formatted by the current formatter |
|
113 | */ |
|
114 | public function findPk($key, ConnectionInterface $con = null) |
|
115 | { |
|
116 | if ($key === null) { |
|
117 | return null; |
|
118 | } |
|
119 | if ((null !== ($obj = SelfpriceTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { |
|
120 | // the object is already in the instance pool |
|
121 | return $obj; |
|
122 | } |
|
123 | if ($con === null) { |
|
124 | $con = Propel::getServiceContainer()->getReadConnection(SelfpriceTableMap::DATABASE_NAME); |
|
125 | } |
|
126 | $this->basePreSelect($con); |
|
127 | if ($this->formatter || $this->modelAlias || $this->with || $this->select |
|
128 | || $this->selectColumns || $this->asColumns || $this->selectModifiers |
|
129 | || $this->map || $this->having || $this->joins) { |
|
130 | return $this->findPkComplex($key, $con); |
|
131 | } else { |
|
132 | return $this->findPkSimple($key, $con); |
|
133 | } |
|
134 | } |
|
135 | ||
136 | /** |
|
137 | * Find object by primary key using raw SQL to go fast. |