Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于一对一的使用问题 #26

Open
andyzu opened this issue May 23, 2020 · 0 comments
Open

关于一对一的使用问题 #26

andyzu opened this issue May 23, 2020 · 0 comments

Comments

@andyzu
Copy link

andyzu commented May 23, 2020

在 $form 里,因为是一对一的关系,所以我写成:
$form->distpicker( [ 'pdetails.country' => '省' , 'pdetails.province' => '市' , 'pdetails.city' => '区' ] )->autoselect( 2 );
如果我这样写,就获取不到值。这三个字段是 一对一的副表 pdetails 表里的字段,我如何使用?
但是我写成:
$form->distpicker( [ 'country' => '省' , 'province' => '市' , 'city' => '区' ] )->autoselect( 2 );

就可以获取到值。但是保存的时候,提示我字段不存在,因为这三个字段不存在在主表里。

如何解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant