eric-maynard commented on code in PR #1838: URL: https://github.com/apache/polaris/pull/1838#discussion_r2139121940
########## persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkStore.java: ########## @@ -294,14 +295,25 @@ List<ModelEntity> lookupFullEntitiesActive( // Currently check against ENTITIES not joining with ENTITIES_ACTIVE String hql = - "SELECT m from ModelEntity m where m.catalogId=:catalogId and m.parentId=:parentId and m.typeCode=:typeCode"; + "SELECT m from ModelEntity m where" + + " m.catalogId=:catalogId and m.parentId=:parentId and m.typeCode=:typeCode and m.id > :tokenId"; + + long tokenId = -1; + if (pageToken.paginationRequested()) { + hql += " order by m.id asc"; + + if (pageToken.hasDataReference()) { Review Comment: This is still polymorphism, we're just not taking advantage of the fact that this is built into the language already: ``` if (pageToken isinstanceof EntityIdPageToken e) { tokenId = e.getEntityId(); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org