Message Boards

work with articles, liferay 7.1

Alberto Imaginanet, modified 3 Years ago.

work with articles, liferay 7.1

New Member Posts: 12 Join Date: 2/14/20 Recent Posts
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
thumbnail
Christoph Rabel, modified 3 Years ago.

RE: work with articles, liferay 7.1

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
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.
Alberto Imaginanet, modified 3 Years ago.

RE: work with articles, liferay 7.1

New Member Posts: 12 Join Date: 2/14/20 Recent Posts
It's not work because I need clear the table AssetEntriesAssetCategoriesRel
thumbnail
Olaf Kock, modified 3 Years ago.

RE: work with articles, liferay 7.1

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Alberto Imaginanet:

It's not work because I need clear the table AssetEntriesAssetCategoriesRel
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