china-distpicker icon indicating copy to clipboard operation
china-distpicker copied to clipboard

关于一对一的使用问题

Open andyzu opened this issue 5 years ago • 0 comments

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

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

如何解决?

andyzu avatar May 23 '20 08:05 andyzu