Disable automatic referencing of ID fields in AutoRegister

In Locode the system seems to register numeric ID’s to be displayed as an arbitrary other field, which isn’t helpful (or meaningful) if it’s something like a description field.
Is there a default to tell it not to do this, or do I have to code in the identity of all the Id fields into TypeFilter to prevent this?
It looks like this sort of thing works, but it’s pretty messy. Is there a better way?:

TypeFilter = (type, request) =>
        .Where(p =>
            p.Items != null
            && p.Items.TryGetValue("ColumnSchema", out var schema)
            && (schema as ColumnSchema)!.IsKey)
        .Each(p2 => p2
            .AddAttribute(new RefAttribute())

It uses the first string field for its description, you can use [Ref(RefLabel="PreferredColumn")] to override, which you can dynamically add when generating database-first types in AutoQueryFeature GenerateCrudServices.TypeFilter as you’re doing.

You can also customize the AppMetadata returned in /metadata/app.json that powers the Auto UI with:

appHost.AddToAppMetadata(metadata => {

As you’ve started using Locode, please checkout the new Locode v2 which has been rewritten in Vue 3:

I’ve added information about referential data at the bottom of the post where you can disable inference with [Ref(None=true)].