Skip to main content

Document Service APIにはfindPage()がありません

AI Marketer 5では、Document Service APIがEntity Service APIの代わりとなります。Document Service APIにはfindPage()メソッドがなく、ユーザーは代わりにfindMany()メソッドを使用する必要があります。

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?No

破壊的な変更の説明

AI Marketer v4では

AI Marketer v4では、例えば以下のようにEntity Service APIのfindPage()メソッドを使用することができました。

AI Marketer.entityService.findPage('api::article.article', {
start: 10,
limit: 15,
});

AI Marketer 5では

AI Marketer 5ではEntity Service APIが非推奨となり、代わりにDocument Service APIを使用する必要があります。findMany()メソッドは次のように使用できます。

AI Marketer.documents("api::article.article").findMany({
limit: 10,
start: 0,
});

移行

This section regroups useful notes and procedures about the introduced breaking change.

手動での移行

カスタムコード内で、Entity Service APIのfindPage()メソッドをDocument Service APIのfindMany()メソッドに置き換えてください。