Files
payload/test/select/collections/CustomID/index.ts
Sasha 526e535763 fix: ensure custom IDs are returned to the result when select query exists (#11400)
Previously, behavior with custom IDs and `select` query was incorrect.
By default, the `id` field is guaranteed to be selected, even if it
doesn't exist in the `select` query, this wasn't true for custom IDs.
2025-02-26 17:05:50 +02:00

16 lines
240 B
TypeScript

import type { CollectionConfig } from 'payload'
export const CustomID: CollectionConfig = {
slug: 'custom-ids',
fields: [
{
name: 'id',
type: 'number',
},
{
name: 'text',
type: 'text',
},
],
}