Conversation
Codecov Report
@@ Coverage Diff @@
## master #11517 +/- ##
==========================================
+ Coverage 96.26% 96.26% +<.01%
==========================================
Files 94 94
Lines 9181 9184 +3
==========================================
+ Hits 8838 8841 +3
Misses 343 343
Continue to review full report at Codecov.
|
ab76be0 to
16a7926
Compare
| // Add table and field name if not exists on attributes with ARRAY(ENUM) type | ||
| if (!attribute.fieldName) { | ||
| attribute.fieldName = options.key; | ||
| attribute.tableName = options.table.tableName || options.table; |
There was a problem hiding this comment.
attribute.tableName is not used anywhere else, I think.
There was a problem hiding this comment.
Yes this looked a bit weird to me as well ... but i had to pass table info at line number 511, for the default value so that the enum name can be generated
| if (this.type instanceof BaseTypes.ENUM) { | ||
| castKey = `${Utils.addTicks( | ||
| Utils.generateEnumName(options.field.Model.getTableName(), options.field.fieldName), | ||
| Utils.generateEnumName(options.field.tableName || options.field.Model.getTableName(), options.field.fieldName), |
There was a problem hiding this comment.
Isn't options.table.tableName available here? It seems odd for attribute to keep tableName
There was a problem hiding this comment.
I don't think i get the table object in options ... i will check once again
|
Hey there :) First of all: Thanks a bunch for your contribution to Sequelize! Much appreciated! A couple of months ago, we have switched from master to main branch as our primary development branch and hence this PR is now outdated :( If you still think this change is making sense, please consider recreating the PR against ✌️ |
|
Closing this since it is still against |
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
Closes #11285
Set
tableNameandfieldNameon attribute with type ARRAY(ENUM)