You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2017/06/16 10:56:17 UTC
Slight API curiosity
Hi all,
Is there any particular reason why Property has a method called "andExp()" instead of "and()"? ObjectSelect and ExpressionFactory use the "and" method name, so it seems like using the "and" method name would be more consistent (and more readable).
Cheers,
- hugi
Re: Slight API curiosity
Posted by Lon Varscsak <lo...@gmail.com>.
+1 Woot!
On Fri, Jun 16, 2017 at 4:54 AM, Hugi Thordarson <hu...@karlmenn.is> wrote:
> > You mean Expression class has "andExp", not Property?
>
> Whoops—of course I did. Pardon me.
>
>
> > The answer is "legacy". This API predates Property, ObjectSelect, and
> other 4.0 additions. It was done long time ago before we figured out our
> modern vocabulary.
>
> Might be a question of adding a new "and()" method and deprecating
> "andExp()"?
>
> - hugi
>
>
> > Andrus
> >
> >> On Jun 16, 2017, at 1:56 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
> >>
> >> Hi all,
> >> Is there any particular reason why Property has a method called
> "andExp()" instead of "and()"? ObjectSelect and ExpressionFactory use the
> "and" method name, so it seems like using the "and" method name would be
> more consistent (and more readable).
> >>
> >> Cheers,
> >> - hugi
>
Re: Slight API curiosity
Posted by Andrus Adamchik <an...@objectstyle.org>.
> On Jun 16, 2017, at 2:54 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>
>>
>> The answer is "legacy". This API predates Property, ObjectSelect, and other 4.0 additions. It was done long time ago before we figured out our modern vocabulary.
>
> Might be a question of adding a new "and()" method and deprecating "andExp()"?
Yeah, we can do it in 4.1
Andrus
Re: Slight API curiosity
Posted by Hugi Thordarson <hu...@karlmenn.is>.
> You mean Expression class has "andExp", not Property?
Whoops—of course I did. Pardon me.
> The answer is "legacy". This API predates Property, ObjectSelect, and other 4.0 additions. It was done long time ago before we figured out our modern vocabulary.
Might be a question of adding a new "and()" method and deprecating "andExp()"?
- hugi
> Andrus
>
>> On Jun 16, 2017, at 1:56 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>>
>> Hi all,
>> Is there any particular reason why Property has a method called "andExp()" instead of "and()"? ObjectSelect and ExpressionFactory use the "and" method name, so it seems like using the "and" method name would be more consistent (and more readable).
>>
>> Cheers,
>> - hugi
Re: Slight API curiosity
Posted by Andrus Adamchik <an...@objectstyle.org>.
You mean Expression class has "andExp", not Property?
The answer is "legacy". This API predates Property, ObjectSelect, and other 4.0 additions. It was done long time ago before we figured out our modern vocabulary.
Andrus
> On Jun 16, 2017, at 1:56 PM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>
> Hi all,
> Is there any particular reason why Property has a method called "andExp()" instead of "and()"? ObjectSelect and ExpressionFactory use the "and" method name, so it seems like using the "and" method name would be more consistent (and more readable).
>
> Cheers,
> - hugi