Skip to content

Commit b660fc2

Browse files
committed
toString update for model generation
1 parent 7f5a5d9 commit b660fc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ubiquity/orm/creator/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ private function getAnnotation($content) {
189189
public function getToString() {
190190
$field = $this->getToStringField();
191191
if (isset($field)) {
192-
$corps = '$this->' . $field;
192+
$corps = '($this->' . $field . "??'no value').''";
193193
} elseif (($pkName = $this->getPkName()) !== null) {
194-
$corps = '$this->' . $pkName . "??'no value'";
194+
$corps = '$this->' . $pkName . ".''";
195195
} else {
196196
$corps = '"' . $this->name . '@"' . '.\spl_object_hash($this)';
197197
}

0 commit comments

Comments
 (0)