get('order'); if (is_null($order)) { $order = $this->min('order'); if (!$order) { $order = 9999; } $order--; $entity->set('order', $order); } } }