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

同步表时ID排序非零,同步表失败 #7714

Open
ericzha76 opened this issue Jan 11, 2025 · 3 comments
Open

同步表时ID排序非零,同步表失败 #7714

ericzha76 opened this issue Jan 11, 2025 · 3 comments

Comments

@ericzha76
Copy link

ericzha76 commented Jan 11, 2025

版本号:

3.72

问题描述:

从第二数据源oracle数据源中导入数据库表OK,但又要求同步表时报错。
修改onl_cgform_field中排序为零后可以正常同步表。

错误截图:

同步数据库失败,Unable to perform unmarshalling at line number 7 and column 20. Message: cvc-complex-type.2.4.a: 发现了以元素 '{"http://www.hibernate.org/xsd/orm/hbm":property}' 开头的无效内容。应以 '{"http://www.hibernate.org/xsd/orm/hbm":meta, "http://www.hibernate.org/xsd/orm/hbm":tuplizer, "http://www.hibernate.org/xsd/orm/hbm":subselect, "http://www.hibernate.org/xsd/orm/hbm":cache, "http://www.hibernate.org/xsd/orm/hbm":natural-id-cache, "http://www.hibernate.org/xsd/orm/hbm":synchronize, "http://www.hibernate.org/xsd/orm/hbm":comment, "http://www.hibernate.org/xsd/orm/hbm":id, "http://www.hibernate.org/xsd/orm/hbm":composite-id}' 之一开头。 : origin(null)

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;
@zhangdaiscott
Copy link
Member

cr

@jeecgos
Copy link

jeecgos commented Jan 14, 2025

未复现,请详细描述下复现步骤。

image

@ericzha76
Copy link
Author

1.application-dev.yml中配置第二数据源 oracle
2.jeecg/jeecg_config.properties中配置相同的数据源oracle
3.注释掉类jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\config\init\CodeGenerateDbConfig.java
4.此时启用了从第二数据源oracle数据库导入表,导入的表id字段在onl_cgform_field中order_num是个随机值「不是最小」
5.此时jeecg会要求把表结构同步到master数据源中会报错。
6.手动修改id字段在onl_cgform_field中order_num为零「最小」,同步表成功。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants