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.
16 lines
240 B
TypeScript
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',
|
|
},
|
|
],
|
|
}
|