You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这个post是通过手动new来创建的,不过我有点思路了,应该先create menu,然后返回id,然后upload menu item的时候不能用自带的json parser,必须手动创建一个通过menu id来指定one to many关系的json格式,然后在controller里面query 出该menu再add。听着很不简洁但是应该可以work,明天试试
有两个类Menu和MenuItem,他们是one to many的结构
我要如何设计上传的API才能在上传的时候创建出关系?比较坑的是Hibernate自动做one to many关系的时候foreign key是被隐藏起来的,这样最简单的上传MenuItem -> 得到后台generate的key -> 将key list嵌入到menu的json里面上传的方法是行不通的
The text was updated successfully, but these errors were encountered: