| @@ 1183-1205 (lines=23) @@ | ||
| 1180 | * | |
| 1181 | * @return int Hashcode | |
| 1182 | */ | |
| 1183 | public function hashCode() | |
| 1184 |     { | |
| 1185 | $validPk = null !== $this->getId() && | |
| 1186 | null !== $this->getLocale(); | |
| 1187 | ||
| 1188 | $validPrimaryKeyFKs = 1; | |
| 1189 | $primaryKeyFKs = []; | |
| 1190 | ||
| 1191 | //relation banner_image_i18n_fk_03c8df to table banner_image | |
| 1192 |         if ($this->aBannerImage && $hash = spl_object_hash($this->aBannerImage)) { | |
| 1193 | $primaryKeyFKs[] = $hash; | |
| 1194 |         } else { | |
| 1195 | $validPrimaryKeyFKs = false; | |
| 1196 | } | |
| 1197 | ||
| 1198 |         if ($validPk) { | |
| 1199 | return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE)); | |
| 1200 |         } elseif ($validPrimaryKeyFKs) { | |
| 1201 | return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE)); | |
| 1202 | } | |
| 1203 | ||
| 1204 | return spl_object_hash($this); | |
| 1205 | } | |
| 1206 | ||
| 1207 | /** | |
| 1208 | * Returns the composite primary key for this object. | |
| @@ 1006-1028 (lines=23) @@ | ||
| 1003 | * | |
| 1004 | * @return int Hashcode | |
| 1005 | */ | |
| 1006 | public function hashCode() | |
| 1007 |     { | |
| 1008 | $validPk = null !== $this->getId() && | |
| 1009 | null !== $this->getLocale(); | |
| 1010 | ||
| 1011 | $validPrimaryKeyFKs = 1; | |
| 1012 | $primaryKeyFKs = []; | |
| 1013 | ||
| 1014 | //relation banners_i18n_fk_c926a5 to table banners | |
| 1015 |         if ($this->aBanners && $hash = spl_object_hash($this->aBanners)) { | |
| 1016 | $primaryKeyFKs[] = $hash; | |
| 1017 |         } else { | |
| 1018 | $validPrimaryKeyFKs = false; | |
| 1019 | } | |
| 1020 | ||
| 1021 |         if ($validPk) { | |
| 1022 | return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE)); | |
| 1023 |         } elseif ($validPrimaryKeyFKs) { | |
| 1024 | return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE)); | |
| 1025 | } | |
| 1026 | ||
| 1027 | return spl_object_hash($this); | |
| 1028 | } | |
| 1029 | ||
| 1030 | /** | |
| 1031 | * Returns the composite primary key for this object. | |