[
https://issues.apache.org/jira/browse/CAY-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrus Adamchik updated CAY-3007:
---------------------------------
Description:
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}
was:
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}
> 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)