|
1
|
{"slug":"/references/payment/interfaces/payment.FindConfig","title":"FindConfig","frontmatter":{"displayed_sidebar":"paymentReference"},"toc":[{"title":"Type parameters","id":"type-parameters","level":2}],"blocks":[{"kind":"markdown","html":"An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,\nwhich provides correct typing of field names in its properties."},{"kind":"heading","level":2,"text":"Type parameters","id":"type-parameters"},{"kind":"typeList","sectionTitle":"FindConfig","types":[{"name":"Entity","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"kind":"typeList","sectionTitle":"FindConfig","types":[{"name":"select","type":"(keyof Entity \\| `string` & `object`)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.\n\nYou can only retrieve data models defined in the same module. To retrieve linked data models\nfrom other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](/references/payment/types/payment.FindConfigOrder)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"__internal","type":"[InternalQueryOptions](/references/payment/types/payment.InternalQueryOptions)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"crossModuleJoins","type":"[CrossModuleJoinSpec](/references/payment/types/payment.CrossModuleJoinSpec)[]","description":"Cross-module join specifications that allows the graph layer to optimize data fetching.\nThe logic behind what gets passed here is owned by the graph layer, and that layer will ensure\nwe don't break boundaries between modules other than for performance optimizations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"parent","type":"`string`","description":"When set, this join is correlated to the target row of the parent join\ninstead of the root entity. The value must match the parent join's\n`target.table`. Used for multi-hop filters such as filtering orders by a\nproduct's sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"link","type":"[CrossModuleJoinLink](/references/payment/types/payment.CrossModuleJoinLink)","description":"Describes a link table connecting the queried root entity to an external table.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"target","type":"[CrossModuleJoinTarget](/references/payment/types/payment.CrossModuleJoinTarget)","description":"Describes an external table that can be filtered or sorted against.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} |