Repository navigation
Fix controller test baking when the table alias differs (3.x) - #1111
Open
dereuromark wants to merge 1 commit into
Open
dereuromark wants to merge 1 commit into
dereuromark wants to merge 1 commit into
Conversation
Baking a controller test resolved the default table, then read it back from the controller as a property named after the table's alias. That only works while the alias equals the controller's table name. With a custom alias the property lookup returned null and the command died with a TypeError in _processModel(). Use the table instance that was already resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bake test controllercrashes when the controller's default table uses an alias that differs from the controller's table name, for example a table callingsetAlias()ininitialize():_processController()already has the table fromfetchTable(), but then looked it up again as a controller property named after the alias. That property only exists when alias and table name match, so the lookup returned null.The table instance is now passed on directly.
Same fix for 2.x: #1110