DJun

Results 12 comments of DJun

thanks very much for your reply and hopes it can be achieved in the future

thanks for your reply! i think mongoengine can be loaded as other orm modules like, and its apis or operations are all like django orm (write model fields and queries,...

i found a new mongodb orm module supported async/await: https://github.com/art049/odmantic

系统版本:Ubuntu 23.04 (VMWare 虚拟机) HotGo版本:2.8.4 (今天重新拉取过最新代码进行测试,还是同样报错) 本机Go版本:1.20.3 (Ubuntu仓库中的版本) 一样的操作,报错提示基本一样: ```Shell ubuntu@ubuntu-VMware-Virtual-Platform:~/hotgo/server$ go build main.go # hotgo/internal/library/hgorm/handler internal/library/hgorm/handler/filter_auth.go:88:58: role.CustomDept.Var undefined (type string has no field or method Var) # hotgo/addons/hgexample/model/input/sysin addons/hgexample/model/input/sysin/table.go:29:12:...

> 这是你数据库版本不支持json或导入时json类型被转换成text导致的,请确认是mysql5.7及以上版本 收到,谢谢!已定位到问题确实是json类型被转成了longtext; 这边用的基本都是 MariaDB,GF文档也提到支持 MariaDB (跟 MySQL 使用同款驱动),但官方文档里面确实提到 json 是 longtext 的代名词。。 这边用 MySQL 重新试试。但也希望热狗框架可以同时适配 MariaDB 这个字段类型的情况。万分感激! 相关文档: [MariaDB JSON Data Type](https://mariadb.com/kb/en/json-data-type/)

> 好的,后续可以考虑适配。短期内仍想使用MariaDB的话需要自行对不兼容的地方做下调整 谢谢,本 issue 可先不关闭,后续其他朋友有需要也可以看到

您好,新建目录后依然是同样情况: ![image](https://github.com/bufanyun/hotgo/assets/727447/0e67d461-bdfa-46c4-a7d0-fc2925e7ec3d)

您好,这边再测了一下,如果“上级菜单”选“根目录”不改动,那可以正常生成进入;如果选了别的目录层级,例如我新建的目录、Dashboard之类的,那么会遇到前面截图出现的bug。 ![image](https://github.com/bufanyun/hotgo/assets/727447/de8bad3c-6cbb-4aef-9f85-7a6e48851849) ![image](https://github.com/bufanyun/hotgo/assets/727447/898272c9-4a94-4d2e-ae69-d8f553e04e63)

> 我也按你说的测了一下,没有复现,即使是Dashboard下也是正常的。有兴趣可以先排查下是什么原因导致的 您好,先感谢答复!这边花了好几天时间排查,由于对整个项目源码尚不大熟悉,目前排查起来较为吃力,抱歉。 根据 console 报错提示,个人直觉感觉是在动态路由那里,有一条加载组件出错。重新试了下加菜单在 Dashboard 下面,代码中 routerGenerator 里面加 console log 把每个 currentRouter 都打印出来,发现有报错对应的 component: undefined 如下所示: ![image](https://github.com/bufanyun/hotgo/assets/727447/d84d3bc7-2f76-4492-8a87-b27e0c6adcbe) ![image](https://github.com/bufanyun/hotgo/assets/727447/257386cc-b35a-4d89-b0f1-5349a04a9c10) ![image](https://github.com/bufanyun/hotgo/assets/727447/6f1360d1-ff51-48b6-8ad5-b4aad543c42f) 根据个人猜想:如果加在根目录,新加菜单的最上级那一项 在数据库里面 component 写的是 `LAYOUT` ,在动态路由读取解析这里可以正常获取到对应的 Layout 组件;但如果我选择了加在已有目录例如 Dashboard...

最新进展: 在数据库中把component字段`ParentLayout`值置空,前端动态路由刷新后就可以获取到对应的 parentLayout 组件了! ![image](https://github.com/bufanyun/hotgo/assets/727447/d31a33c8-2b95-43dc-a01e-ab5cc2806a4e) ![image](https://github.com/bufanyun/hotgo/assets/727447/9c2e28c4-47c5-48d7-a396-4d4785206e3e) 表示大受震撼哈哈哈,定位到 Go 这边生成代码对应代码是 server/internal/library/hggen/views/curd.go `tplData["mainComponent"] = "ParentLayout"` ,恳请您确认一下是否可以修复这里、发布新版本。不胜感激! ![image](https://github.com/bufanyun/hotgo/assets/727447/0e8d41ee-5e2b-4502-8ff3-96ef1b235ce3)