-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:databaseSource is core/database packageSource is core/database packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Bug report
Required System information
- Node.js version: v16.16.0
- Yarn version: 1.22.19
- Strapi version: 4.3.4
- Database: SQLite
- Operating system: MacOS 12
Describe the bug
The SQLite Dialect class does not definite a useReturning method, which defaults the value to false even though SQLite does support RETURNING statements.
This causes a series of issues, including insert queries not returning IDs appropriately from the query builder.
Steps to reproduce the behavior
- Launch a test Strapi instance with SQLite.
- Edit the
entity-manager.jsfile to console.log the result ofawait this.createQueryBuilder(uid).insert(dataToInsert).execute(). - Try calling
strapi.db.query(<UID>).createMany({ data: [<ENTRIES>] }). - Notice how the line from step 2 is only returning one of the multiple IDs it should be returning.
Expected behavior
useReturning should be defined so that it returns true.
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:databaseSource is core/database packageSource is core/database packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Type
Projects
Status
Archived