Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Versioned::get_including_deleted breaks filter on ID #3075

Closed
tractorcow opened this issue Apr 28, 2014 · 1 comment
Closed

BUG Versioned::get_including_deleted breaks filter on ID #3075

tractorcow opened this issue Apr 28, 2014 · 1 comment

Comments

@tractorcow
Copy link
Contributor

When creating a DataList from Versioned::get_including_deleted() any calls to byID or byIDs on this will instead filter by recordID, not the object's ID field.

The problem is that the RecordID is correctly aliased in the SELECT fragment with https://github.com/silverstripe/silverstripe-framework/blob/3.1/model/Versioned.php#L285, but no such alias is generated for any WHERE fragments.

A well placed and tested replaceText should resolve this.

@tractorcow
Copy link
Contributor Author

Fixed in 4.0. Realistically, this will not be addressed in 3.x due to the breaking changes it introduced in the refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant