BUG: exclude() clears previously selected filters() (Trac #7529) #564

Merged
merged 1 commit into from Jun 22, 2012

Conversation

Projects
None yet
2 participants
@sminnee
Member

sminnee commented Jun 22, 2012

This bug was caused by the fact that SQLQuery::whereAny() removed existing filters. In line with addWhere() and setWhere(), I split this into addWhereAny() and setWhereAny(). Strictly speaking, this drops the method SQLQuery::whereAny(), but it was really just an internal function for exclude, and so I think that's acceptable.

@halkyon

This comment has been minimized.

Show comment Hide comment
@halkyon

halkyon Jun 22, 2012

Member

Seems good, and matches the set/add methods which I changed in SQLQuery a short while back.

I wonder if we should at least add whereAny() back as a deprecated method that just calls setWhereAny().
Someone out there might be using that method, and would need to know that it's deprecated.

Member

halkyon commented Jun 22, 2012

Seems good, and matches the set/add methods which I changed in SQLQuery a short while back.

I wonder if we should at least add whereAny() back as a deprecated method that just calls setWhereAny().
Someone out there might be using that method, and would need to know that it's deprecated.

@sminnee

This comment has been minimized.

Show comment Hide comment
@sminnee

sminnee Jun 22, 2012

Member

You're probably right.

Member

sminnee commented Jun 22, 2012

You're probably right.

BUG: exclude() clears previously selected filters() (Trac #7529)
This bug was caused by the fact that SQLQuery::whereAny() removed existing filters.  In line with addWhere() and setWhere(), I split this into addWhereAny() and setWhereAny().  Strictly speaking, this drops the method SQLQuery::whereAny(), but it was really just an internal function for exclude, and so I think that's acceptable.
@sminnee

This comment has been minimized.

Show comment Hide comment
@sminnee

sminnee Jun 22, 2012

Member

Ok, did that, and fixed a broken test.

Member

sminnee commented Jun 22, 2012

Ok, did that, and fixed a broken test.

halkyon added a commit that referenced this pull request Jun 22, 2012

Merge pull request #564 from sminnee/trac-7529
BUG: exclude() clears previously selected filters() (Trac #7529)

@halkyon halkyon merged commit 32913d4 into silverstripe:3.0 Jun 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment