1
0
mirror of synced 2025-02-02 21:41:45 +03:00

3903 Commits

Author SHA1 Message Date
Luís Cobucci
e94467d6da
Fix incorrect value in L2C+lock test
Which was causing the optimistic lock to fail in MySQL since it was
trying to update the data with exact same value.
2018-02-17 19:46:22 +01:00
‘Andrey Lukin’
8fc1d74820
Add test for L2C using optimistic locks
As explained in #7067, fields with `@ORM\Version` annotation were not
being added to L2C cached data.
2018-02-17 18:05:27 +01:00
Luís Cobucci
7873f700b0
Add missing tests for day calculation
For the DATE_SUB() and DATE_ADD() functions.
2018-02-09 17:21:06 +01:00
Luís Cobucci
46c0861f45
Fix date calculation in tests (again)
Now using PHP to calculate the expected date manipulation, keeping a day
as delta since PHP resets the hour when performing operations with
days/weeks/months/years.

February is a wonderful month, isn't it?
2018-02-09 17:21:06 +01:00
Michael Moravec
cf99d62472
QueryDqlFunctionTest: Increase delta for testDateAdd() to work in February 2018-02-02 08:59:35 +01:00
Nicolas FRANÇOIS
40f2a3efba
Add test case for many-to-many collection deletion, when owning side has a composite PK 2018-01-30 01:04:28 +01:00
Tyler Romeo
bb8970286d
Allow association mappings as IDs for joined-table inherited entity
SchemaTool has custom logic for creating the primary key of a
joined-table inherited entity. This logic overlooked association maps
as a possible source for identity columns, resulting in a fatal error
when fetching the primary key list for child entities.

Removed any custom logic for generating primary keys for root entities
in joined-table inheritance, deferring to the common logic used for
other entities.

Also adjusted the child entity logic, scanning association maps for
identity columns, and including the column as appropriate. It also
ensures that the primary key columns are in the correct order.
2017-12-19 17:58:31 +01:00
Guilherme Blanco
a16dc65cd2 Fixes #1391, DDC-3693 2017-12-18 22:46:48 -05:00
Konstantin Kuklin
c308986a90
Fix insufficient variable check
To ensure that `AbstractQuery#setResultCacheProfile()` doesn't raise
errors when being called with `null`.
2017-12-17 03:21:52 +01:00
Maximilian Ruta
32c125def1
Fix syntax error when join with discriminator 2017-12-17 01:25:50 +01:00
Luís Cobucci
441c5d138c
Reduce complexity of LimitSubqueryWalker#walkSelectStatement()
Ensuring that the code follows our code standards.
2017-12-16 23:31:50 +01:00
Gabriel Caruso
d0d802309c Clean elses 2017-12-14 05:55:54 -02:00
Guilherme Blanco
e149f89cfe
Merge pull request #6820 from plfort/#6819-pagination-optim
#6819 Optimize LimitSubqueryWalker
2017-12-10 19:56:31 -05:00
JKapitein
ad0a8c53fa
Add Type::GUID to $typeAlias list in EntityGenerator
Right now, when generating entities, a column of type 'guid' will generate the following PHPDoc:

```
/**
 * Get id
 *
 * @return guid
 */
public function getId() {...}
```

Since guid is not a valid PHP type, this throws a warning in PHPStorm, and I assume most IDEs.

Adding the type to the type alias list fixes the problem.
2017-11-28 00:11:32 +01:00
Luís Cobucci
bc7aeb9d11
Make entity generator create the correct options
The `EntityGenerator` was not creating the field options for all
supported values.
2017-11-26 20:05:52 +01:00
foaly-nr1
b211dd4db7
Add failing test for misleading exception message
Describes: https://github.com/doctrine/doctrine2/issues/6029
2017-11-26 17:55:59 +01:00
Sasha Alex Romanenko
b3331b2237
Enforce sequence XSD requirement
Supply default values for allocationSize and initialValue optional parameters.

Related to: https://github.com/doctrine/doctrine2/issues/6682
2017-11-26 16:33:27 +01:00
Mathieu Duplouy
15c145f3b3
Add failing test for DCOM-288
Reported on: https://github.com/doctrine/common/issues/600
2017-11-26 13:54:54 +01:00
Jan Jakes
99b2e57606
Fix overwriting explicit cache namespace 2017-11-26 12:48:12 +01:00
Luís Cobucci
d3759a2447
Fix incorrect arguments on SetupTest
Which was only caught by adding proper type declaration on private
methods.
2017-11-26 12:26:28 +01:00
Luís Cobucci
b8fd708139
Fix parameter name comparison in QueryBuilder#setParameter() with different types 2017-11-24 02:43:01 +01:00
Michael Moravec
6cb5a9c50a
Fix parameter name comparison in AbstractQuery#setParameter() with different types 2017-11-24 02:43:00 +01:00
Michael Moravec
4bbb1067ac
Add failing test for #6699 2017-11-24 02:42:59 +01:00
Oskar Stark
6b5eb11458
Use SymfonyStyle for command output 2017-11-24 01:25:17 +01:00
Luís Cobucci
43a88d539d
Format commands' tests
To simplify and organise the code (also replacing `$this->assert*`
with `self::assert*`).
2017-11-24 01:25:15 +01:00
Pierre-Louis FORT
4ab9413675 Test that orderByItem is string 2017-11-10 10:45:57 +01:00
Pierre-Louis FORT
91408a3a54 #6819 Optimize LimitSubqueryWalker when resultVariable are involved and they are not used in "order by" 2017-11-09 14:34:11 +01:00
Luís Cobucci
59792654c0
Improve tests for DATE_ADD and DATE_SUB
So that we can do proper assertions and cover all the possibilities
of the functions.
2017-10-31 15:48:26 +01:00
Sébastien Lévêque
f277eef6ea
Add support second, minute, week, year on DATE_ADD and DATE_SUB 2017-10-29 21:48:40 +01:00
Grégoire Paris
ffd3d34f34
Disable uuid generation
Apparently, setting a value by hand is not enough to avoid it.
2017-10-14 12:39:58 +02:00
Grégoire Paris
57e9feffb2
Avoid uuid generation
pg needs an extra module to do this, so let's spare us that and set them
manually.
2017-10-14 12:39:58 +02:00
Grégoire Paris
6b5c97055c
Set null on delete, at database level 2017-10-14 12:39:57 +02:00
Grégoire Paris
30fccf8e83
Proove orphan-removal on many-to-one is useless 2017-10-14 12:39:57 +02:00
Luís Cobucci
8e16748ff8 Merge pull request #6734 from ossinkine/issue-6734
Add DateInterval type parameter
2017-10-11 13:13:09 +02:00
Marco Pivetta
66f903a38f
#6759 remove # symbol from @group annotation as per @lcobucci's review
Ref: https://github.com/doctrine/doctrine2/pull/6760#discussion_r143353225
2017-10-08 14:26:45 +02:00
Marco Pivetta
83e00d5010
#6759 cleaning up test case, using new models from the isolated namespace 2017-10-07 12:52:34 +02:00
Marco Pivetta
d831f4fd9f
#6759 segregating test models into their own namespace 2017-10-07 12:48:19 +02:00
Marco Pivetta
6ba2d1c317
#6759 cleaning up test case body 2017-10-07 10:09:44 +02:00
Jan Langer
5f99cad669
Failing test - inverse side OneToOne loaded without identifier condition 2017-10-06 17:34:34 +02:00
Gocha Ossinkine
4fdbdabae4 Add DateInterval type parameter 2017-09-28 13:15:40 +05:00
Dariusz Ruminski
c7d6d62393 Use newer PHP syntax 2017-09-06 01:32:49 +02:00
Marco Pivetta
c016e2d434
Adding minimal test to verify EntityManager behavior against #5796 2017-09-02 13:55:07 +02:00
Marco Pivetta
e1e7485e58
Correcting the SimpleInsertPerformanceBench, which was running into duplicate record integrity constraint violations when run with >1 revs 2017-08-26 16:41:03 +02:00
Marco Pivetta
922c55f5dd
Replacing direct quote model-set schema creation with actually existing model-set setup 2017-08-26 14:15:05 +02:00
Marco Pivetta
660f164568
#6284 #6217 s/$this->assert/self::assert as per @lcobucci's review 2017-08-25 09:21:12 +02:00
Marco Pivetta
c9d1f852de
#6284 removing unused lazy entity 2017-08-22 21:41:04 +02:00
Marco Pivetta
c29a1e96b7
#6284 removing unused separate class 2017-08-22 21:40:42 +02:00
Marco Pivetta
a2f4053a81
#6284 renaming variables, classes and properties to fit tested behavior 2017-08-22 21:38:44 +02:00
Marco Pivetta
3f09e20955
#6284 correcting alignment, removing stuff that isn't strictly needed 2017-08-22 21:31:01 +02:00
Marco Pivetta
220dc79ebf
#6284 renaming entities to match the scope of this test 2017-08-22 21:29:27 +02:00