What changed: All findByXxx_PrevAndNext and filterFindByXxx_PrevAndNext methods have been completely removed from generated persistence classes (*Persistence, *PersistenceImpl, and *Util) for entities utilizing Service Builder 7.4+. Previously, these methods returned a 3-element array containing the previous, current, and next neighboring entities from an ordered result set.
Why: To significantly reduce codebase bloat. Within DXP, these methods generated over 600,000 lines of code but were only used in three internal places. Existing finder methods easily replicate this behavior.
Who is affected: Developers using Service Builder on 7.4 or Quarterly releases who currently rely on PrevAndNext finder methods in their custom logic.
How to migrate:
Choose one of two methods based on your dataset size:
List Lookup (Recommended): Fetch the current entity using
findByPrimaryKey, then retrieve the full matching list using standardfindByXxxmethods. Find the current entity's index to grab the previous (index - 1) and next (index + 1) items.DSL Queries (For large datasets): Use
dslQuerywith a limit of 1 to execute two targeted database queries — one fetching the immediate previous entry, and one fetching the immediate next entry.