File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
Started from version 0.2.5
9
9
10
- ## [ 0.3.1] - 2020-02-12
10
+ ## [ 0.3.1-3 ] - 2020-02-12
11
11
12
12
### Fixed
13
13
14
- * allow to have not "id" property as a primary key
14
+ * allow to have not "id" property as a primary key [ # 287 ]
15
15
16
16
## [ 0.3.0] - 2019-12-29
17
17
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " admin-bro-sequelizejs" ,
3
- "version" : " 0.3.2 " ,
3
+ "version" : " 0.3.3 " ,
4
4
"description" : " Sequelize adapter for AdminBro" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -145,7 +145,11 @@ class Resource extends BaseResource {
145
145
}
146
146
147
147
async delete ( id ) {
148
- return this . SequelizeModel . destroy ( { where : { id } } )
148
+ return this . SequelizeModel . destroy ( {
149
+ where : {
150
+ [ this . SequelizeModel . primaryKeyField ] : id ,
151
+ } ,
152
+ } )
149
153
}
150
154
151
155
createValidationError ( originalError ) {
You can’t perform that action at this time.
0 commit comments