Needs work
Project:
Drupal core
Version:
main
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Apr 2018 at 07:54 UTC
Updated:
4 Apr 2023 at 18:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amateescu commentedHere's an initial patch.
Comment #4
amateescu commentedThis issue also depends on #2916018: Allow the table mapping to be initialized from outside the storage, so we need a combined patch for now.
Comment #5
tstoecklerWow, this is an AWESOME issue! Being able to condense our complex table setup into a single method call is pretty genius. Yay! This will be very very useful for Views but also Entity Query, etc.
Two thoughts:
isRevisionable()is strange as we do not checkisTranslatable()before using the (revision) data table. So I think we should either check both or neither.Comment #6
amateescu commentedThanks @tstoeckler! It was actually @plach's idea in #2955442-10: Add a way to get all the tables in which a field is stored from TableMappingInterface.3, so I don't deserve all the credit :)
Re #5:
1. Sure thing, I don't mind doing an if-else instead.
2. The
isRevisionable()check is needed because if you call this method on a non-revisionable entity type and pass$all_revisions = TRUE, the method will return an empty string. So I thought it should be more developer friendly and always return the correct table name.Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
arunkumarkThe patch has been rerolled for Drupal 10.1.x version.
Comment #18
smustgrave commentedNot sure this is a major anymore.
The new functions will need to be typehinted.
Also change record will be needed to announce the new function.