legacy-knowledge-base
公開されました Jul. 2, 2025

AssetEntry と AssetCategory を関連付ける方法

written-by

Jose L. Bango

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • AssetEntryLocalService.getAssetCategoryAssetEntries() 特定のカテゴリの結果を返しません。
  • AssetCategoryAssetEntryを関連付けるにはどうすればよいですか?

Environment

  • DXP 7.1
  • DXP 7.2
  • DXP 7.3

解決策

  • AssetEntryLocalService.getAssetCategoryAssetEntries() および AssetCategoryLocalServiceUtil.getAssetEntryAssetCategories() (および関連するメソッド) は 7.1 で廃止されました。 代わりに AssetEntryAssetCategoryRelLocalService を使用する必要があります。
    • 注: AssetEntryLocalService.getAssetCategoryAssetEntries() まったく機能しませんが、 AssetCategoryLocalServiceUtil.getAssetEntryAssetCategories() (および関連するメソッド) は機能する可能性があります。 いずれにせよ、それらの使用は避けるべきです。
  • 例:
    long[] assetEntryPKs =
    _assetEntryAssetCategoryRelLocalService.getAssetEntryPrimaryKeys(assetCategoryId);

    for (long assetEntryPK: assetEntryPKs) {
    AssetEntry assetEntry = _assetEntryLocalService.getEntry(assetEntryPK);
    ...
    }

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base