56 Commits

Author SHA1 Message Date
Kevin Antonio Rateni Iatauro
0895e36738
Return newly created IDs when using createMany (#14269)
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2023-03-22 08:43:52 +01:00
Bassel Kanso
c08e0afda6
Merge branch 'main' into chore/transactions 2023-01-18 11:04:32 +02:00
Bassel
12dd68f4a7 Improve transaction API:
- make it possible to have nested transactions
- wrap the knex transaction api and apply changes everywhere it was used
2023-01-13 12:23:30 +02:00
Marc-Roig
cf01fb8db6 make strict connect explicit when inserting relation 2023-01-11 16:40:06 +01:00
Marc-Roig
2528ae5637 Merge branch 'feature/relations-reordering' into relations-reordering/non-strict-connect 2023-01-02 14:44:02 +01:00
Marc-Roig
589571319f change strictConnect to strict 2022-12-20 15:09:21 +01:00
Marc-Roig
2639f8418e add strict configuration 2022-12-12 18:16:37 +01:00
Josh
c51cde28a8 Merge branch 'main' into feature/relations-reordering 2022-12-09 17:10:00 +00:00
Pierre Noël
ded213f13f manual rollback 2022-12-06 14:29:56 +01:00
Pierre Noël
3a2f6490e6 reduce transaction size 2022-12-06 14:29:56 +01:00
Marc-Roig
36ad92b2d6 sort connect array 2022-12-01 14:13:24 +01:00
Marc-Roig
c73971f9fd allow connecting the same id multiple times 2022-11-25 16:19:04 +01:00
Marc-Roig
67beb86c1d test before after when creating relations 2022-11-22 18:57:04 +01:00
Marc-Roig
6a1100b4f9 fix tests 2022-11-21 15:00:47 +01:00
Marc-Roig
c3c8f40d5b remove adjacent relations sorting as it is not necessary 2022-11-20 10:50:31 +01:00
Marc-Roig
114d67a9f2 fix adjacentRelations query to look for joinColum name 2022-11-20 10:49:59 +01:00
Marc-Roig
5fad91721b add reordering in attachRelations 2022-11-20 10:49:24 +01:00
Marc-Roig
980624f176 add sorting 2022-11-17 10:08:59 +01:00
Marc-Roig
6df6c9487b remove sorting from orderer 2022-11-16 12:44:28 +01:00
Marc-Roig
ea5325b46c compact max order and adjacent sql queries into one 2022-11-11 17:08:52 +01:00
Marc-Roig
6e9424cf00 make relations sorter a pure function 2022-11-10 16:53:44 +01:00
Marc-Roig
5106ed251e test relation orderer 2022-10-24 15:18:38 +02:00
Marc-Roig
0f330d1410 Merge branch 'feature/relations-reordering' into relations-reordering/fractional-orderer 2022-10-24 14:48:10 +02:00
Marc-Roig
36ca8d7df6 max order default to 0 if no relations 2022-10-24 11:56:22 +02:00
Pierre Noël
05c93d44c5 add content api tests for connect relation format 2022-10-24 11:09:01 +02:00
Marc-Roig
2e7aa7c2a9 use position attribute for positional arguments 2022-10-24 10:21:29 +02:00
Marc-Roig
485355820f add connect disconnect format 2022-10-24 09:22:45 +02:00
Pierre Noël
95f3abfa6b remove TODO comments 2022-10-07 15:42:48 +02:00
Pierre Noël
6e67d82f5f add transaction in DB entity manager 2022-10-06 18:03:10 +02:00
Marc-Roig
9edb46c310 check if set is empty 2022-09-30 10:54:44 +02:00
Pierre Noël
3e60852fa0 fix partial update delete 2022-09-30 10:54:44 +02:00
Pierre Noël
bf16d07463 throw when deletePreviousAnyToOneRelations and deletePreviousOneToAnyRelations are called for non compatible relations 2022-09-30 10:54:43 +02:00
Pierre Noël
8e5543b21d fix cleanOrder + use hasOrderColumn and hasInverseOrderColumn 2022-09-30 10:54:41 +02:00
Pierre Noël
a56879e12b implement cleanOrder function 2022-09-30 10:54:41 +02:00
Pierre Noël
9830910312 fix morphToMany order 2022-09-30 10:54:40 +02:00
Pierre Noël
eb8d79e0c8 restructure updateRelations - connect 2022-09-30 10:54:40 +02:00
Pierre Noël
3ffc748b86 improve max query in updateRelations - connect 2022-09-30 10:54:39 +02:00
Pierre Noël
43106732a2 improve max query in insertRelations 2022-09-30 10:54:39 +02:00
Pierre Noël
a9819dc375 use onConflict in updateRelations 2022-09-30 10:54:38 +02:00
Pierre Noël
3b0d6b6e7f refactor deleteAllRelations 2022-09-30 10:54:37 +02:00
Pierre Noël
4ce09c5193 various fixes 2022-09-30 10:54:37 +02:00
Pierre Noël
4ef5e1fa48 fix set issues 2022-09-30 10:54:36 +02:00
Pierre Noël
c1d82b6f9e use set format 2022-09-30 10:54:36 +02:00
Pierre Noël
5d0eb61fae start factorizing code 2022-09-30 10:54:35 +02:00
Pierre Noël
e7428cdf83 fix tests 2022-09-30 10:54:35 +02:00
Pierre Noël
e2d4cb483c fix delete previous relations for anyToOne 2022-09-30 10:54:34 +02:00
Pierre Noël
eaf0d84224 add decrements to queryBuilder + use it 2022-09-30 10:54:34 +02:00
Pierre Noël
59417498ab use NULL as default order + better handle migration 2022-09-30 10:54:33 +02:00
Pierre Noël
83c29436ca adapt all entity-manager with 2 order columns 2022-09-30 10:54:33 +02:00
Pierre Noël
c4031449fb implement 2 columns + adapt attachRelations 2022-09-30 10:54:32 +02:00