I have a model with a UUID property, saved in a database `uuid` field. In Nova I can declare it like this:

```
Text::make('UUID');

```

That doesn't fill the field with a default value (a new, random UUID), so I add that:

```
Text::make('UUID')
    ->default(
        function () {
            return Uuid::uuid4();
        }
    )

```

That fills the field, but it's editable, which I don't want to allow, though I do want it to be shown when looking at a detail view, so I add these:

```
Text::make('UUID')
    ->default(
        function () {
            return Uuid::uuid4();
        }
    )
    ->readonly()
    ->onlyOnDetail()

```

However, this is unusable because it results in the `uuid` field being omitted from the generated insert query, and I get an SQL error:

```
SQLSTATE[HY000]: General error: 1364 Field 'uuid' doesn't have a default value
(SQL: insert into `things` (`name`, `description`, `updated_at`, `created_at`) 
values (Case, ?, 2021-07-23 18:07:28, 2021-07-23 18:07:28))

```

In case it was the readonly status that was causing this, I tried just hiding it with:

```
->hideWhenCreating()
->hideWhenUpdating()

```

But that suffered the same SQL issue, suggesting it's visibility, not readonly status that causes the problem.

An alternative is to use a `Hidden` field type, which the docs suggest for exactly this kind of purpose. This works a bit, allowing the dynamic default value and preventing editing, but it doesn't allow the field to be shown on any view. Configured like this, it doesn't appear at all:

```
Hidden::make('UUID')
    ->default(
        function () {
            return Uuid::uuid4();
        }
    )
    ->showOnDetail()

```

i.e. the `showOnDetail` doesn't override the hidden nature of the field.

What combination of properties should I use to have a field that is:

1. Dynamically populated with a default value
2. Not editable
3. Hidden on creation
4. Shown on detail
5. Included in database queries?