Review main Merged

27874[BUGFIX] Respect table mapping on caching

Andreas Kienast CR +2 V +2 Easy +4 −4 updated 09/05/18, 18:49

Commit message

The method analyzeFields() of DBAL's DatabaseConnection caches the
table structure. The cache always uses the real table name, ignoring
any mapping, which results in a RuntimeException:

"Could not update BLOB >>>> no WHERE clause found!"

The method now checks for a possible mapping and sets the alias
as table name.

Review

  • Code review CR +2
    • Xavier Perseguers +2
    • Markus Klein +1
  • Verified V +2
    • Xavier Perseguers +2
    • Markus Klein +1

Issues 1

Files 1

Review log 30

Show 5 earlier messages
  1. Mr. Jenkins commented on patch set 1 09/05/18, 18:49

  2. Wouter Wolters commented on patch set 1 09/05/18, 18:49

    Hey Andreas, thanks again for working on DBAL. I have one small comment. Can you fix this small thing? I'm now heading home from work.

    DatabaseConnection.php:332

    space after if
  3. Mr. Jenkins commented on patch set 2 09/05/18, 18:49

  4. Wouter Wolters updated the commit message in patch set 2 09/05/18, 18:49

  5. Mr. Jenkins commented on patch set 3 09/05/18, 18:49

  1. Wouter Wolters commented on patch set 3 CR +1 09/05/18, 18:49

    Thanks for fixing:)
  2. Andreas Kienast commented on patch set 2 09/05/18, 18:49

    added space after if
  3. Andreas Kienast uploaded patch set 2 09/05/18, 18:49

  4. Andreas Kienast commented on patch set 3 09/05/18, 18:49

    You're welcome. I see, you fixed some silly typos in the commit message. Thank you :)
  5. Mr. Jenkins commented on patch set 4 09/05/18, 18:49

  6. Andreas Kienast uploaded patch set 4 09/05/18, 18:49

  7. Andreas Kienast commented on patch set 4 09/05/18, 18:49

    removed translation to original table name which inverts the introduced table mapping
  8. Andreas Kienast updated the commit message in patch set 4 09/05/18, 18:49

  9. Mr. Jenkins commented on patch set 5 09/05/18, 18:49

  10. Andreas Kienast updated the commit message in patch set 5 09/05/18, 18:49

  11. Mr. Jenkins commented on patch set 6 09/05/18, 18:49

  12. Wouter Wolters voted on patch set 6 CR +1 09/05/18, 18:49

  13. Markus Klein commented on patch set 7 V +1 CR +1 09/05/18, 18:49

    Cannot test, but I trust you. So you got my v+1 too when it makes things better for Oracle.
  14. Markus Klein commented on patch set 7 09/05/18, 18:49

    Did you check every usage of $this->mapping if it is accessed with the mapped name and not the original name?
  15. Xavier Perseguers commented on patch set 7 CR +1 09/05/18, 18:49

    I'm still fixing DBAL bugs in the Install Tools step so I did not yet face this bug and cannot test it right now.
  16. Xavier Perseguers commented on patch set 7 V +2 CR +2 09/05/18, 18:49

    Same for me. But this is a typical change so nothing to really worry about, we have lots of work to make DBAL on other DBMS work properly anyway.
  17. Mr. Jenkins commented on patch set 7 09/05/18, 18:49

  18. Wouter Wolters commented on patch set 7 09/05/18, 18:49

    Cherry-pick patchset 6 over a clean master an amend the commut and push again.
  19. Wouter Wolters wrote 09/05/18, 18:49

    Topic set to "dbal".
  20. Xavier Perseguers merged patch set 8 09/05/18, 18:49

  21. Andreas Kienast commented on patch set 7 09/05/18, 18:49

    No every usage, but I'm sure the mapped name is always used. Otherwise, the queries would crash with e.g. "Table or view does not exists". Simple CRUD and mm-relatation statements are working.
  22. Andreas Kienast uploaded patch set 7 09/05/18, 18:49

  23. Andreas Kienast commented on patch set 7 09/05/18, 18:49

    I faced this bug in the extension manager.
  24. Andreas Kienast commented on patch set 7 09/05/18, 18:49

    This is still required.
  25. Andreas Kienast commented on patch set 7 09/05/18, 18:49

    Oops, I made a commit that was supposed for another issue, but I has some cherry-picks in my repo. How do I revert to patch set #6?