While working on a key value entity storage, I found out that getClass() cannot be overridden by any subclasses.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
Issue tags: +KV Entity Storage
FileSize
698 bytes
tim.plunkett’s picture

FileSize
1.37 KB
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -212,7 +212,7 @@ public function range($start = NULL, $length = NULL) {
     // As the factory classes hardwire QueryBase::getClass, it needs to be
     // hardwired here too.

Well I totally blew past this comment here... But that is only true for the Sql implementation! So let's move the comment.

msonnabaum’s picture

Definitely seems like an improvement, but it's still a bit unclear why the second example is hardcoded.

tim.plunkett’s picture

FileSize
1.33 KB

Yeah no idea. Why not?

msonnabaum’s picture

Status: Needs review » Reviewed & tested by the community

Yeah, seems legit.

tim.plunkett’s picture

Issue tags: +Quick fix

Thanks!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.