Coder Social home page Coder Social logo

V2.7 cannot use ORM JSON storage about gf HOT 4 OPEN

Gallery2000 avatar Gallery2000 commented on July 18, 2024
V2.7 cannot use ORM JSON storage

from gf.

Comments (4)

wln32 avatar wln32 commented on July 18, 2024

我在我的机器上试了pgsql没问题,另这个和mysql没有关系,只要数据库支持json类型的字段就可以

from gf.

Issues-translate-bot avatar Issues-translate-bot commented on July 18, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I tried pgsql on my machine and there was no problem. This has nothing to do with mysql, as long as the database supports json type fields.

from gf.

leavky avatar leavky commented on July 18, 2024

社区的这个问题是我写的,看到说是2.64是正常的,我降级后将生成的文件和2.7生成的文件对比了下,发现了问题。
2.6.4生成的:
image
2.7 以及 2.7.1 生成的:
image
通过对比发现2.7 生成的多了orm标签
现在有两个解决办法:

  1. 修改生成的文件,将orm标签删除
  2. 不修改生成的文件,在自己上一级结构体中写上 orm 标签。
    image

希望可以改下,官方工具不生成这个orm标签

from gf.

Issues-translate-bot avatar Issues-translate-bot commented on July 18, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I wrote this question in the community. I saw that it was normal for 2.64. After downgrading, I compared the generated files with those generated by 2.7 and found the problem.
Generated by 2.6.4:
image
2.7 and 2.7.1 generated:
image
Through comparison, it was found that 2.7 generated more ORM tags.
There are two solutions now:

  1. Modify the generated file and delete the orm tag
  2. Do not modify the generated file, but write the orm tag in the upper-level structure.
    image

I hope it can be changed. The official tool does not generate this ORM tag.

from gf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.