public static function get_by_transaction(Transaction $transaction, $limit = null) {
		$db = Database::Get();
		if (is_null($limit)) {
			$ids = $db->get_column('SELECT id FROM transaction_log WHERE transaction_id=?', [ $transaction->id ]);
		} else {
			$ids = $db->get_column('SELECT id FROM transaction_log WHERE transaction_id=? ORDER BY created DESC LIMIT ' . $limit, [ $transaction->id ]);
			$ids = array_reverse($ids);
		}

		$transaction_logs = [];
		foreach ($ids as $id) {
			$transaction_logs[] = self::get_by_id($id);
		}

		return $transaction_logs;
	}