Affects Version/s: 7.2.0 GA1, 7.2.X, 7.2.1 CE GA2, Master
Component/s: Asset Framework
The method getAssetEntryPrimaryKeys(long assetCategoryId) from AssetEntryAssetCategoryRelLocalService class is supposed to returns an array with the primary keys of the asset entries related to the category; unfortunately it returns and array with the value assetCategoryId repeated for each related asset entry.
This is the wrong code:
This is the right code:
Steps to Reproduce
1. Add a new category
2. Upload 10 documents adding the category to each of them
3. Get the categoryId from the AssetCategory table in the database
4. Execute the attached script replacing the value for categoryId with the one in your database
The asset entry IDs of the ten uploaded documents would be printed.
The category ID supplied is printed out ten times.