remove oldest entry

I am using the favorites list from the apps store to show the top-ten values. To let the table not to grow unnecessary I want to remove the oldest entries from the table (number of entries -/- ten). How to ?
1 answers

I have no experience with the appstore module you mentioned, but a way to delete old objects would be by making a retrieve action and sorting that retrieve action by the createdDate attribute (setting it to 'ascending' should make you retrieve the oldest object first). You can then delete that object.

In a java action you could even set a limit to the amount of objects you'd retrieve as well as an offset, if you'd want to delete a certain amount of oldest objects directly.