You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: changelog.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
-[CHANGED]`instance.equals` now only checks primary keys, instead of all attributes.
18
18
-[REWRITE] Rewrite model and instance to a single class - instance instanceof Model [#5924](https://github.com/sequelize/sequelize/issues/5924)
19
19
-[REMOVED] Counter cache plugin
20
+
-[FIXED] All associations now prefer aliases to construct foreign key [#5267](https://github.com/sequelize/sequelize/issues/5267)
20
21
21
22
## BC breaks:
22
23
-`hookValidate` removed in favor of `validate` with `hooks: true | false`. `validate` returns a promise which is rejected if validation fails
@@ -28,10 +29,10 @@
28
29
- Removed support for `pool:false`, if you still want to use single connection set `pool.max` to `1`
29
30
- Removed default `REPEATABLE_READ` transaction isolation, use config option to explicitly set it
30
31
- Removed MariaDB dialect - this was just a thin wrapper around MySQL, so using `dialect: 'mysql'` instead should work with no further changes
31
-
-`hasOne` now prefer `as` option to generate foreign key name, otherwise it defaults to source model name
32
32
-`instance.equals` now provides reference equality (do two instances refer to the same row, i.e. are their primary key(s) equal). Use `instance.get()` to get and compare all values.
33
33
- Instances (database rows) are now instances of the model, instead of being a separate class. This means you can replace User.build() with new User() and sequelize.define with User extends Sequelize.Model. See #5924
34
34
- The counter cache plugin, and consequently the `counterCache` option for associations has been removed. The plugin is seeking a new maintainer - You can find the code [here](https://github.com/sequelize/sequelize/blob/aace1250dfa8cd81a4edfd2086c9058b513f6ee0/lib/plugins/counter-cache.js)
35
+
- All associations type will prefer `as` when constructing the `foreignKey` name. You can override this by `foreignKey` option.
35
36
36
37
# 3.23.2
37
38
-[FIXED] Type validation now works with non-strings due to updated validator@5.0.0 [#5861](https://github.com/sequelize/sequelize/pull/5861)
This will add the attribute `projectId` or `project_id` to User. Instances of Project will get the accessors getWorkers and setWorkers. We could just leave it the way it is and let it be a one-way association.
192
+
This will add the attribute `WorkersId` or `Workers_id` to User. Instances of Project will get the accessors getWorkers and setWorkers. We could just leave it the way it is and let it be a one-way association.
193
193
But we want more! Let's define it the other way around by creating a many to many association in the next section:
0 commit comments