Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Jun 2013 at 12:38 UTC
Updated:
29 Jul 2014 at 22:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
swentel commentedTagging
Comment #2
swentel commentedLet's see.
Comment #4
yched commentedThis looks good to me - well, aside from the test fails ;-)
Comment #5
swentel commenteduhu, fixing them now, patch in a few minutes :)
Also, I've just added a protected property locally so we can do something like this (like getStorageDetails() or getSchema(): good or not ?
Comment #6
swentel commentedForgot an insane amount of code to remove :)
Comment #8
swentel commentedEven betterer
Comment #9
yched commentedWell, I initially wanted to go that way too but caching that is a problem IMO. This info can get stale, and it's not easy to find the right places to clear it. I mean, an entity can have been created in a concurrent request, and there's no way to detect that.
[edit: and bad things can happen if we return false positives or false negatives here - especially false negatives, because we allow more things on a field that is supposed to be "empty"]
So given that in practice, very few code will need that data, I think it's fine to recompute it each time someone needs it.
Then all this patch does is move the code to a method, which is fine IMO.
Comment #11
swentel commentedYeah, makes sense indeed.
Comment #12
yched commentedThanks !
RTBC if green.
Comment #14
swentel commented#11: 2018731-move-field-has-data-11.patch queued for re-testing.
Comment #15
swentel commentedMajor botfluke. RTBC as per #12
Comment #16
yched commentedYay ! Thanks !
Comment #17
alexpottCommitted 30f6062 and pushed to 8.x. Thanks!
Comment #18
alexpottOh... this will need a change notitce... field_has_data existed in D7...
Comment #19
chx commentedhttps://drupal.org/node/2021853
Comment #21
xjmUntagging. Please remove the tag when the change notification task is completed.