You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2026/08/30 21:44:00 UTC

[jira] [Closed] (CAY-3007) Deprecate SelectById

     [ https://issues.apache.org/jira/browse/CAY-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-3007.
--------------------------------
    Resolution: Fixed

> Deprecate SelectById
> --------------------
>
>                 Key: CAY-3007
>                 URL: https://issues.apache.org/jira/browse/CAY-3007
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Major
>             Fix For: 5.0-M4
>
>
> SelectById query is unneeded and will be deprecated. It can be easily replaced by ObjectSelect + "self" property. But we need to extend "self" with a few missing flavors. The new API is somewhat more verbose, but doesn't introduce needless new concepts:
> {noformat}
> // SelectById.query(Artist.class, 1).selectOne(context);
> ObjectSelect.query(Artist.class)
>      .where(Artist.SELF.eqId(1))
>      .selectOne(context);
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)