You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2015/05/11 07:05:52 UTC

Re: new fluent API

I just committed this change per CAY-2012. It is not backwards compatible with M2.

> On Apr 15, 2015, at 11:06 AM, Aristedes Maniatis <ar...@maniatis.org> wrote:
> 
> On 15/04/2015 6:57pm, Andrus Adamchik wrote:
>> From my experience I am also leaning towards append-only API. I think it is worth changing the API with some deprecation to eliminate "override". I guess the only case where I am 50/50 on keeping override is "where".
> 
> Deprecation might be awkward here and still keep nice short clear names. For me I'm very much in favour of 'where' being append-only. In fact that was the use case that started my thinking in the first place. On the plus side:
> 
> 1. It works like Rails
> 2. It makes sense when read aloud as English:  query.where(something).where(somethingElse).
> 3. It makes adding queries in a loop/conditionals easier
> 
> 
> On the other side:
> 
> 1. You can still write all your code with "and" and never use "where"
> 2. There is some use case I can't think of where you want to replace your query before you execute it.
> 
> 
> 
> Ari
> 
> 
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>