Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jun 2018 at 13:19 UTC
Updated:
17 Jul 2018 at 21:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amateescu commentedThis should do it.
Comment #4
amateescu commentedThis should fix the tests.
Comment #5
jibranNothing is broken here. It is just incomplete. This seems like a task not a bug.
These can be null as well.
Comment #6
amateescu commentedAs mentioned in the IS, the table mapping is now responsible for generating the table names from a set of entity type and field storage definitions, but when you set the table mapping in the storage through
\Drupal\Core\Entity\Sql\SqlContentEntityStorage::setTableMapping(), the internal table name variables of the storage are not updated. That is a bug.Comment #7
tstoecklerLooks good to me. Seems like we could write a test for #6, no? Otherwise seems RTBC to me.
Comment #8
jibranSo can we have a test only patch?
I don't think base table can be null for SQLStorage.
Comment #9
amateescu commentedSure.
Comment #11
jibranThanks, looks great now.
Comment #12
amateescu commentedI found a few more places that are getting the base table name from the entity type definition instead of the table mapping.
Comment #13
tstoecklerNice! #12 will fix some fatals when not specifying the tables in the annotation, which is nice. Not sure if all of them, but that's for #2232465: Deprecate table names from entity definitions to find out. RTBC++
And thanks for your great effort, in particular the idea to split this off in the first place. 👍🏿
Comment #14
plachLooks good!
Can we retrieve the table mapping just once? :)
Why is this needed?
Comment #15
amateescu commentedRe #14:
1. Sure, done :)
2. Because that node type is only needed in
EntityTypedDataDefinitionTest::testEntities()and creating it in thesetUp()method breaksEntityTypedDataDefinitionTest::testEntityDefinitionIsInternal()somehow. See the first fail from #2.Comment #16
tstoecklerStill looks good to me, thanks. 👍🏿
Comment #17
plachSaving credit.
Comment #19
plachCommitted cf458f2 and pushed to 8.6.x. Thanks!