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

关于实体映射,建立表索引,目前名称会重复 #366

Closed
pigwing opened this issue Jul 10, 2020 · 3 comments
Closed

关于实体映射,建立表索引,目前名称会重复 #366

pigwing opened this issue Jul 10, 2020 · 3 comments

Comments

@pigwing
Copy link
Contributor

pigwing commented Jul 10, 2020

QQ截图20200710120941
目前实体映射的attribute中,Index中的name是固定写死的.当使用FluentApi动态建立分表的时候.存在的情况为:
1_Table和2_Table中索引名称会重复,导致建表失败.能否加入format形式,例如 [Index("{TableName}-uk_phone", "phone", true)] 占位符的形式,在建表的时候,自动建立唯一的索引.

@2881099
Copy link
Collaborator

2881099 commented Jul 12, 2020

[Index("{tablename}_idx_01", "name")]

@2881099
Copy link
Collaborator

2881099 commented Jul 12, 2020

测试过程中发现,mysql/sqlserver 可以不用设置 {tablename}

@pigwing
Copy link
Contributor Author

pigwing commented Jul 12, 2020

哎呀.又是postgresql的问题,我是postgresql下的

2881099 pushed a commit that referenced this issue Jul 12, 2020
@2881099 2881099 closed this as completed Jul 21, 2020
2881099 pushed a commit that referenced this issue Jul 27, 2020
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

2 participants