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

兼容模型同连接不同数据库使用关联查询 #454

Closed
wants to merge 1 commit into from

Conversation

Hhh0121
Copy link
Contributor

@Hhh0121 Hhh0121 commented May 5, 2023

场景:关联模型是同连接不同数据库,需要正常关联join查询

@liu21st
Copy link
Member

liu21st commented May 5, 2023

table属性本来就支持定义 数据库名.表名的方式

@Hhh0121
Copy link
Contributor Author

Hhh0121 commented May 5, 2023

table属性本来就支持定义 数据库名.表名的方式

@liu21st 模型通过设置connection属性,已经指定了数据库连接信息,是否应该在table属性上再去写数据库名

@liu21st
Copy link
Member

liu21st commented Jul 9, 2023

问题是如果之前有人加了数据库名的话 你这用法就出错了。现在的使用规范就是如果你要跨库的 就加上库名 要不然就是当前库 数据库配置文件也只是定义了当前操作库 不影响调用的时候跨库使用

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

Successfully merging this pull request may close these issues.

3 participants