1
0
mirror of synced 2024-12-14 07:06:04 +03:00
Commit Graph

4774 Commits

Author SHA1 Message Date
flip111
72ae7f5497 Changed GroupBy alias to real column name for all platforms and adjusted failing test accordingly. Has fallback in cases where real column name is not possible (example: Doctrine\Tests\ORM\Query\SelectSqlGenerationTest::testGroupBySupportsIdentificationVariable) 2013-09-30 11:08:42 +02:00
Diego Mazzaro
bd0e0c3fcf [bugfix] if BIGINT or SMALLINT version field was not incremented.
Made version field accepted type coherent between ClassMetadataInfo and BasicEntityPersister
2013-09-29 16:17:10 +02:00
Cas
1fda797c8f Appended newline to (newly) generated files for PSR2 compatibility
Appended newline to (newly) generated files for PSR2 compatibility
Additionally, slightly improved styling of concatenating return value
2013-09-28 17:47:35 +02:00
Benjamin Eberlei
008187982d Merge pull request #792 from FabioBatSilva/DDC-2668
[DDC-2668] Fix trim leading zero string
2013-09-26 14:23:07 -07:00
Kristian Mide
0326731348 Respect unsigned fields when tables get converted to entities.
This is working on our mysql setup, however i have no idea of the consequences of this change when using other RDBMSes.
2013-09-26 14:41:06 +02:00
flip111
76fda9562c Update SqlWalker.php fixed wrong GROUP BY clause on SQL Server platform
Without this patch a query would like like:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY sclr0
```
Using the column alias in the GROUP BY clause. However this is not allowed on SQL Server. References:
1. http://stackoverflow.com/a/3841804
2. http://technet.microsoft.com/en-us/library/ms189499.aspx (Logical Processing Order of the SELECT statement)

The correct query should be:
```
SELECT c0_.Country AS sclr0
FROM Continent c0_ WITH (NOLOCK)
WHERE c0_.Country = 38
GROUP BY c0_.Country
```
2013-09-26 14:11:56 +02:00
Peter Kokot
dca09148ca CS fixes 2013-09-22 02:12:30 +02:00
flip111
a18aba1bb6 Improved error messages in Paginator: LimitSubqueryOutputWalker
The already existing follow-up check throwing "Not all identifier properties can be found in the ResultSetMapping: %s" is a much more technical description.

If $sqlIdentifier is empty (count 0) it can be concluded that there are no mapped results. An alternative error message could thus be "The Paginator does not support queries without mapped results." (line 153).

Possibly '!=' on line 154 could be replaced by '>' because i think this is the only situation that can occur. But since i don't know this for sure, i left it like i found it.

Didn't use elseif in this commit as per Stof his suggestion.
2013-09-17 21:01:09 +02:00
flip111
b803f06c8f Improved error messages in Paginator: LimitSubqueryOutputWalker
The already existing follow-up check throwing "Not all identifier properties can be found in the ResultSetMapping: %s" is a much more technical description.

If $sqlIdentifier is empty (count 0) it can be concluded that there are no mapped results. An alternative error message could thus be "The Paginator does not support queries without mapped results." (line 153).

Possibly '!=' on line 154 could be replaced by '>' because i think this is the only situation that can occur. But since i don't know this for sure, i left it like i found it.
2013-09-17 15:07:08 +02:00
Fabio B. Silva
689da2f36b [DDC-2668] Fix trim leading zero string 2013-09-16 21:36:19 -04:00
Matthieu Napoli
6f538c509c Implemented "contains" operator for Criteria expressions 2013-09-16 14:56:04 +02:00
javer
64a0161935 HHVM compatibility: func_get_args
All func_get_args() calls have been moved to the top of the methods
because HHVM doesn't keep a copy of the original args for performance
reasons.

See facebook/hiphop-php#1027 for details.
2013-09-15 20:57:30 +03:00
Benjamin Eberlei
b6e624b6bf Delete some very old, leftover code. 2013-09-11 22:43:38 +02:00
Matthieu Napoli
8875462241 #DDC-2664 Improving and fixing documentation for new Proxy factory flags usage as of DCOM-210 2013-09-09 11:30:18 +02:00
Benjamin Eberlei
4a50493ab7 [DDC-2608][DDC-2662] Fix SequenceGenerator requiring "sequenceName" and now throw exception. Fix a bug in quoting the sequenceName. 2013-09-08 15:59:58 +02:00
Benjamin Eberlei
5c2157219d [DDC-2660] Fix error with NativeSQL, ResultSetMappingBuilder and Associations as Primary Key. 2013-09-08 14:38:59 +02:00
Benjamin Eberlei
3719a6f2f2 [DDC-2661] Fix bug in YamlDriver not passing options from id to mapField() 2013-09-08 10:37:13 +02:00
Maks Feltrin
f98dfc4758 DO NOT OVERRIDE CUSTOM TREE WALKERS IN getIterator() 2013-08-29 08:36:39 +02:00
Guilherme Blanco
fc7719d5fa Merge pull request #771 from caponica/cqb-indexby
Added indexBy option to createQueryBuilder
2013-08-28 20:15:55 -07:00
Christian Morgan
b0513a7517 Added indexBy option to createQueryBuilder
Added way to access the underlying QueryBuilder#from() method's 'indexBy' parameter when using EntityRepository#createQueryBuilder()
2013-08-28 22:35:29 +01:00
Attila Fulop
5669aaf4a3 Fix for entity generator discriminator column 2013-08-28 18:26:16 +03:00
Guilherme Blanco
09d51f9df5 Fixing missing table aliases when using Many2Many persister. 2013-08-21 23:39:40 -04:00
Adam Prager
b041c22814 Entity generator - trait in parent class 2013-08-20 12:15:17 +02:00
Guilherme Blanco
cc83ac6ce8 Centralize InputParameter SQL generation. 2013-08-19 00:33:45 -04:00
Guilherme Blanco
43fc8bafa7 DDC-1858 Added missing support to ResultVariable in LikeExpression. 2013-08-18 23:52:32 -04:00
Guilherme Blanco
605c32dbb3 Merge pull request #758 from doctrine/DDC-2235
Fixed DDC-2235.
2013-08-15 21:36:22 -07:00
Guilherme Blanco
f674445486 Fixed DDC-2235. 2013-08-16 00:07:06 -04:00
Douglas Greenshields
494ab1fc2b corrected English grammar in docblocks 2013-08-13 20:45:04 +01:00
Guilherme Blanco
7f1c1d2b4a Fixed DDC-2506 by manually updating code. Closes PR #708. 2013-08-13 01:07:34 -04:00
Dustin Thomson
27bae51fa0 Modified executeInserts method in JoinedSubclassPersister to only check for the presence of columns in a composite primary key 2013-08-11 19:41:10 -06:00
Roger Llopart Pla
1bc6140394 Added docblock. 2013-08-10 16:58:07 +02:00
Roger Llopart Pla
7f1becf283 Appending the Paginator tree walker hint, instead of removing all the other hints. 2013-08-10 16:58:07 +02:00
Benjamin Eberlei
95af021ed9 Merge pull request #737 from Koc/fix-schema-validator-master
Skip not mapped public properties in SchemaValidator
2013-08-10 07:27:45 -07:00
Benjamin Eberlei
610e18949b Merge pull request #744 from jbruni/patch-1
Corrected PHP type for "decimal" mapping type
2013-08-10 07:23:50 -07:00
Konstantin.Myakshin
3c1fd9a3a9 Skip not mapped public properties in SchemaValidator 2013-08-07 01:18:15 +03:00
amakhov
d8fcdc0c54 Add hour to DATE_ADD and DATE_SUB. Excepcion message fix 2013-08-06 12:40:30 +04:00
amakhov
dd975fe53d Add hour to DATE_ADD and DATE_SUB 2013-08-06 12:20:22 +04:00
Guilherme Blanco
354d7050dc Merge pull request #720 from bakura10/fix-paginator
Allow to have non-distinct queries
2013-08-05 20:59:12 -07:00
Guilherme Blanco
e0fd377828 Removed ticket that was breaking the build. DDC-2524 is a circular dependency that is impossible to be fixed with our current codebase. 2013-08-03 19:03:10 -04:00
Guilherme Blanco
d9c1782a4f Properly fixed DDC-1858. Added support for ResultVariable in NullComparisons while using HavingClause. 2013-08-03 17:38:55 -04:00
J Bruni
3c613b9c02 Corrected PHP type for "decimal" mapping type
"Basic Mapping" documentation says:
"decimal: Type that maps a SQL DECIMAL to a PHP string."
2013-08-03 05:44:15 -03:00
Guilherme Blanco
a19106b03d Merge pull request #731 from austinsmorris/PersistentCollection-initialize-coll
[DDC-2564] - PersistentCollection - initialize coll
2013-07-30 22:36:15 -07:00
Guilherme Blanco
157588f6dc CS fixes. 2013-07-30 12:11:08 -04:00
Guilherme Blanco
c7b4c9bf0f Fixed DDC-1884. 2013-07-30 01:29:34 -04:00
Guilherme Blanco
0e010994a7 Merge pull request #740 from doctrine/FilterCollectionEnhancement
Synchronized support of FilterCollection with ODM by adding missing method
2013-07-29 18:44:10 -07:00
Guilherme Blanco
d4814dec42 Synchronized support of FilterCollection with ODM by adding missing method. 2013-07-29 21:24:08 -04:00
Fabio B. Silva
1fbe1ffc5a fix DDC-2579 2013-07-29 19:31:44 -04:00
Guilherme Blanco
a53fe14fa2 Merge pull request #717 from hackedd/patch-1
Allow query parameters starting with an underscore
2013-07-29 13:37:51 -07:00
Guilherme Blanco
2dd73d4def Kept BC. 2013-07-29 10:46:47 -04:00
Guilherme Blanco
c28b457221 Modified Hydrators to be per-query instances instead of a singleton-like approach. 2013-07-28 20:30:42 -04:00
Marco Pivetta
d7881a1ec2 Merge pull request #733 from Lumbendil/master
Update Parser.php
2013-07-24 04:13:12 -07:00
Roger Llopart Pla
9b574ad53b Update Parser.php
Fix the docummentation for Parser::Literal()
2013-07-24 13:07:06 +02:00
Austin Morris
1c8ae50557 do not initialize coll on add() 2013-07-22 18:54:02 -04:00
Austin Morris
6bae2eac29 Initialize coll when using Collection methods inside PersistentCollection 2013-07-22 14:42:03 -04:00
Marco Pivetta
4bc8f7be16 Merge pull request #728 from armetiz/patch-1
Color message like the update tools
2013-07-22 08:19:50 -07:00
Thomas Tourlourat
4882ff1ef5 Add info tag around ATTENTION 2013-07-22 17:11:53 +02:00
Nicolas Nutten
eba933bb47 To avoid "SpacingAfterParams" error with PHPCS Symfony2 coding standard
Hello,
I added two blank lines in comments two avoid the following error with PHPCS Symfony2 coding standard :
Error Code: SpacingAfterParams
Error Description: Last parameter comment requires a blank new line after it.
2013-07-22 10:56:18 +02:00
Thomas Tourlourat
0c3581a1f8 Color message like the update tools 2013-07-19 11:33:35 +02:00
Guilherme Blanco
fbbb161987 Merge pull request #719 from tristanlins/fix/entity-generator-extensibility
Access properties via static:: instead of self::.
2013-07-17 17:18:01 -07:00
Michaël Gallego
3f112db725 Allow to have non-distinct queries 2013-07-09 17:31:30 +02:00
Guilherme Blanco
78fc129614 Merge pull request #632 from Padam87/entgentrait
entity generator - ignore trait properties and methods
2013-07-07 12:37:55 -07:00
Tristan Lins
641774630b Access properties via static:: instead of self::.
The properties of EntityGenerator are now protected instead of private.
But this does not make sense until they are accessed with static::.
Otherwise the templates cannot be overwritten within a sub class.
2013-07-05 13:40:57 +02:00
Paul
6aa58d9939 Allow query parameters starting with an underscore 2013-07-04 10:12:36 +02:00
Dave Hulbert
5e700db6d3 Fix grammar in CreateCommand 2013-07-02 16:29:36 +01:00
Dave Hulbert
c57f2c39f6 Fix grammar in DropCommand 2013-07-02 16:28:58 +01:00
Benjamin Eberlei
29d6da0fa0 Merge pull request #703 from shulcsm/patch-1
Clear visitedCollections
2013-06-30 01:38:02 -07:00
Sander Marechal
06ed21e883 Remove extra-lazy-get for ManyToMany relation 2013-06-27 14:19:39 +02:00
Sander Marechal
5635fa60a4 Check owning entitiy on extra lazy get with OneToMany relation 2013-06-27 14:17:41 +02:00
Benjamin Eberlei
a91050e7f4 [DDC-2350] Eager Collections are not marked as initialized, leading to multiple queries being executed. 2013-06-25 19:34:12 +02:00
Guilherme Blanco
20e5d98b7b Merge pull request #640 from denkiryokuhatsuden/patch-1
[Paginator]Add hidden field ordering for postgresql
2013-06-24 19:23:36 -07:00
Guilherme Blanco
457036aacb Merge pull request #702 from FabioBatSilva/DDC-2459
[DDC-2459]ANSI compliant quote strategy
2013-06-23 14:26:49 -07:00
Fabio B. Silva
1cff8b4d98 Fix DDC-2519 2013-06-21 16:07:09 -04:00
Fabio B. Silva
a165f63c8c ANSI compliant quote strategy 2013-06-21 16:05:59 -04:00
Sander Marechal
2879162015 No need to lookup metadata 2013-06-20 14:00:58 +02:00
Sander Marechal
3b92cfac5a Use find() if the indexBy field is the identifier 2013-06-20 13:45:38 +02:00
Sander Marechal
53c9ffda30 Get rid of variable 2013-06-20 10:20:16 +02:00
Sander Marechal
3555007f08 Return NULL for non-existent keys
The load() function already returns just one entity or NULL, so
the current() is not needed and the result can be returned directly.
2013-06-20 10:09:52 +02:00
Sander Marechal
523697d0b6 [DDC-1398] Extra-lazy get for indexed associations
If an association is EXTRA_LAZY and has an indexBy, then
you can call get() without loading the entire collection.
2013-06-20 09:29:56 +02:00
shulcsm
3340234785 Clear visitedCollections
Visited collections are cleared only in commit(). Commit clears up only if it actually has something to do. Processing large amounts of records without changing them cause visitedCollections to grow without any way of clearing.
2013-06-19 16:34:44 +03:00
Guilherme Blanco
7903a2b513 Merge pull request #695 from doctrine/RepositoryFactory
Implemented support for RepositoryFactory.
2013-06-14 09:19:43 -07:00
Guilherme Blanco
52b3fc1fc3 Updated since php doc tag. 2013-06-14 12:07:28 -04:00
Adam Prager
73e2aa54ef moved php version check 2013-06-14 10:07:05 +02:00
Michaël Perrin
37d7df6ac4 Fix phpDoc syntax in ClassMetadataInfo.php 2013-06-14 11:00:17 +03:00
Guilherme Blanco
3488049c18 Reduced granularity of DefaultRepositoryFactory reference to ObjectRepository instances, in cases where consumers are completely rewrote EntityRepository. 2013-06-13 23:59:08 -04:00
Guilherme Blanco
a66fc03441 Reducing dependency on RepositoryFactory by providing EntityManager as a getRepository argument. 2013-06-13 23:53:53 -04:00
Guilherme Blanco
37e7e841c3 Fixed wrong interface. 2013-06-13 23:31:18 -04:00
Guilherme Blanco
7eb744126b Implemented support for RepositoryFactory. 2013-06-13 21:47:40 -04:00
Fabio B. Silva
f16c8e3efe Fix DDC-2478 2013-06-13 16:44:02 -04:00
Guilherme Blanco
6ef48561ba Merge pull request #688 from sellingsource/master
Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration
2013-06-12 12:03:24 -07:00
Fabio B. Silva
c1e688fc81 drop useless support for associations 2013-06-12 10:30:51 -04:00
Fabio B. Silva
d961028b14 small optimization 2013-06-12 10:30:51 -04:00
Fabio B. Silva
d685f592fe Fix DDC-2494 2013-06-12 10:30:51 -04:00
Guilherme Blanco
3d86c82a7f DDC-2476 Better approach for reverse engineer. Some refactoring done to driver. 2013-06-12 02:00:36 -04:00
Guilherme Blanco
0d834d0bd4 DDC-2489 Added missing semicolon when dump-sql on schema update. 2013-06-12 00:31:25 -04:00
Dustin Thomson
529064aff2 Modified identity function to work with joined inheritance tables.
Added regression tests
2013-06-11 18:09:49 -06:00
Fabio B. Silva
710d0d1109 Fix DDC-1995 2013-06-07 17:24:05 -04:00
John Brown
4ef043fc3b updating sql walker to use quote strategy in joins 2013-06-07 08:56:58 -07:00
John Brown
afb9c829e2 updating sql walker to use quote strategy in joins 2013-06-07 08:49:49 -07:00
John Brown
77b905eaa8 Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration
Based on:
http://www.doctrine-project.org/jira/browse/DDC-1845
cb72219b11
2013-06-06 15:08:22 -07:00
Fabio B. Silva
27511374ec Fix DDC-2475 2013-06-04 23:50:43 -04:00