Custom `id` Field
Using @nuxt/content v3, what is the simplest way of querying on a custom id field?
The flat database I'm using is imported from elsewhere and I don't want to massage it first. If it is full of yml files with an id field, how can I specify my collection so that I can query on this field? It seems to be overwritten by @nuxt/content's own id field.
Indeed id is a specific key for Nuxt Content and module overwrite it. There is not solution for overwriting id field at the time. Could you provide a simple reproduction of what you want to achieve? There might be some workarounds for reach your goal
I have a large set of yml files I want to import that have ids in them. Example
I do not want to massage the data or edit it before importing it.
My current solution is to add symbolics_id to my schema and use the content:file:afterParse hook to set the value with ctx.content.symbolics_id = ctx.content.meta.body.id. It took me a while to make this hack; I'd prefer something simpler.