KD2 Framework  Check-in [9f9f4cbfbc]

Overview
Comment:EntityManager: id is already set null in exists() method
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 7.3
Files: files | file ages | folders
SHA1: 9f9f4cbfbc560fa90dce7f739e52ca995ffad3d5
User & Date: bohwaz on 2022-04-03 21:58:55
Other Links: branch diff | manifest | tags
Context
2022-04-03
22:20
AbstractEntity: set ID to null if exists = false check-in: d30aecca48 user: bohwaz tags: 7.3
21:58
EntityManager: id is already set null in exists() method check-in: 9f9f4cbfbc user: bohwaz tags: 7.3
21:58
JS Query Builder: Add option to be able to define a default selected operator when switching columns check-in: 61cf23a723 user: bohwaz tags: 7.3
Changes

Modified src/lib/KD2/DB/EntityManager.php from [58017792b8] to [fb6845c8e8].

227
228
229
230
231
232
233
234
235
236
237
238
239
	public function delete(AbstractEntity $entity): bool
	{
		$db = $this->DB();
		$return = $db->delete($entity::TABLE, $db->where('id', $entity->id()));

		if ($return) {
			$entity->exists(false);
			$entity->id(null);
		}

		return $return;
	}
}







<





227
228
229
230
231
232
233

234
235
236
237
238
	public function delete(AbstractEntity $entity): bool
	{
		$db = $this->DB();
		$return = $db->delete($entity::TABLE, $db->where('id', $entity->id()));

		if ($return) {
			$entity->exists(false);

		}

		return $return;
	}
}