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

mock数据出错 #123

Open
osxcn opened this issue Dec 10, 2019 · 1 comment
Open

mock数据出错 #123

osxcn opened this issue Dec 10, 2019 · 1 comment
Labels

Comments

@osxcn
Copy link

osxcn commented Dec 10, 2019

步骤:

  1. 创建Unit表
    image
  2. 创建User表
    image
  3. 创建Matter表
    image
  4. 创建http接口,相应数据结构为
    image

mock数据出错,多次重置无效
image

@osxcn
Copy link
Author

osxcn commented Dec 10, 2019

查看数据后发现,由于unit表的parent表示上级部门信息,因此其数据类型依旧为Unit,另外由于Unit与User表中存在互相调用的情况,此时mock出来的数据可能各种各样,有字符串的,也有布尔的。
由于业务需要,这种两个数据模型互相包含以及自身包含自身是客观存在的,那么是否在设计的时候这样处理:如果出现此类情况,字段值直接显示为null?

@huntbao huntbao added the bug label Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants