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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

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

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