Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: work with articles, liferay 7.1
Hello! I'm creating service for work with articles.I can not find solutions for do this:
- Remove featured category from all articles
- Put the featured category to the 5 most recent.
Has anyone done something like this?I new in Liferay and I don't know what classes to use
- Remove featured category from all articles
- Put the featured category to the 5 most recent.
Has anyone done something like this?I new in Liferay and I don't know what classes to use
I think, AssetEntryLocalService is what you are looking for.
You could use AssetEntryLocalService.clearAssetCategoryAssetEntries(long categoryId) to delete all of them or fetch a list of entries getAssetCategoryAssetEntries, iterate through it and remove only some of them.
You could use AssetEntryLocalService.clearAssetCategoryAssetEntries(long categoryId) to delete all of them or fetch a list of entries getAssetCategoryAssetEntries, iterate through it and remove only some of them.
It's not work because I need clear the table AssetEntriesAssetCategoriesRel
Alberto Imaginanet:
More (and important) information on "clearing a table" and understanding what's in Liferay's database, and what you might want to change there, can be found here, together with a printable poster (PDF) of the important parts of the database structure: https://liferay.dev/blogs/-/blogs/understanding-liferay-s-database
It's not work because I need clear the table AssetEntriesAssetCategoriesRel
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™