Skip to content

Fix Reference::getTheirFieldName getter usage#1854

Merged
mvorisek merged 1 commit intodevelopfrom
fix_theirmodel_field_name_getter
Sep 5, 2022
Merged

Fix Reference::getTheirFieldName getter usage#1854
mvorisek merged 1 commit intodevelopfrom
fix_theirmodel_field_name_getter

Conversation

@mvorisek
Copy link
Copy Markdown
Member

@mvorisek mvorisek commented Sep 5, 2022

fix #1853

@mkrecek234 please test

@mkrecek234
Copy link
Copy Markdown
Contributor

@mvorisek The bug above seems fixed, ScopeBuilder however creates a new bug then with a boolean field (e.g., is_deleted) in this line of code:

'option' => static::getOption($inputType, $value, $condition),

throwing:
image

:: = {Atk4\Ui\Form\Control\ScopeBuilder}
$condition = {Atk4\Data\Model\Scope\Condition}
$inputType = "text"
$inputsMap = {string[78]} ["number", "number", "number", "date", "date", +73 more]
$operator = "equals"
$operatorKey = "equals"
$operatorsMap = {string[18]} ["=", "!=", ">", ">=", "<", +13 more]
$rule = "is_deleted"
$value = false
$_COOKIE = {string[1]} ["1eqggjdoafr1hg2..."]
$_SERVER = {array[32]}
$GLOBALS = {array[13]}

@mkrecek234

This comment was marked as outdated.

@mvorisek
Copy link
Copy Markdown
Member Author

mvorisek commented Sep 5, 2022

@mvorisek The bug above seems fixed, ScopeBuilder however creates a new bug then with a boolean field (e.g., is_deleted) in this line of code...

I tried to reproduce with boolean field and hit another ScopeBuilder issue. I filed #1855 issue for it. Probably some issue with (no to ui) typecasting. But the exception is different than you posted here, so please post on the issue to reproduce the exception you get.

This PR fixes #1853 and I am merging it.

@mvorisek mvorisek marked this pull request as ready for review September 5, 2022 19:55
@mvorisek mvorisek merged commit 28fc624 into develop Sep 5, 2022
@mvorisek mvorisek deleted the fix_theirmodel_field_name_getter branch September 5, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ScopeBuilder with hasOne reference not working

2 participants