1
0
mirror of synced 2024-12-13 22:56:04 +03:00
Commit Graph

590 Commits

Author SHA1 Message Date
Guilherme Blanco
a44579303c Merge pull request #493 from nmpolo/codegenerationfixes
Do not add trailing whitespace to blank lines
2012-11-05 16:19:39 -08:00
Fabio B. Silva
2f7e970c5f Fix DDC-2121 2012-11-05 21:53:07 -02:00
Sebastian Bauer
a27be2fab6 added unsigned mapping to SchemaTool options 2012-11-05 19:49:16 +01:00
Nick Masters
e402a0c078 Spaces around ! sign 2012-11-04 15:22:32 +00:00
Nick Masters
3a8ea7260c Merge remote-tracking branch 'origin/master' into codegenerationfixes 2012-11-04 15:14:54 +00:00
Christophe Coevoet
1d3fe87215 Removed an unused private method in the SchemaValidator 2012-11-03 16:37:34 +01:00
Christophe Coevoet
5a6c398ea0 Fixed coding standards in the Tools namespace 2012-11-03 16:37:31 +01:00
Markus Lanthaler
1b7ca67fdb Improve DocBlock annotations of generated entities
Currently, the DocBlock annotations for member variables contain the variable name as description which is redundant and should be removed. Furthermore the class is annotated with the FQN instead of just the name. This makes automatically generated documentation quite ugly.
2012-11-02 17:15:44 +01:00
Nick Masters
0a2ba38e58 Add new line to end of file 2012-10-30 22:42:01 +00:00
Nick Masters
0f92944edd Do not add trailing whitespace to blank lines 2012-10-30 22:22:04 +00:00
Guilherme Blanco
a16a935bff Merge pull request #472 from twinh/master
Fixed empty namespace in generated code when repository class do not have namespace
2012-10-21 18:38:53 -07:00
Fabio B. Silva
fb467a1196 Fix DDC-2079 2012-10-20 15:37:13 -03:00
jakoch
d4a6c488ca fixed use statements 2012-10-12 13:53:20 +02:00
Oleksandr Kovalov
90bbb35655 Fixed bug with comment option not being added to column. 2012-10-11 15:57:51 +00:00
twinh
8cc24f4cf2 removed blanks 2012-10-11 06:04:03 -07:00
twinh
66efd65e64 fixed empty namespace in generated code when repository class do not have namespace 2012-10-11 06:01:55 -07:00
Ethan
c604adc804 Use protected so generator can be extended
This is definitely something I'd like to be able to extend, and I imagine others might too.
2012-10-09 08:00:51 -03:00
Benjamin Eberlei
a5e043e6e6 Merge pull request #444 from goetas/xmlfix
Fixed some typo error in XML Exporter
2012-10-05 14:16:59 -07:00
Benjamin Eberlei
f7220ae416 Merge pull request #455 from radmar/master
Fixed unique-constraint name in XML Exporter
2012-10-05 11:23:55 -07:00
Benjamin Eberlei
0c8be37ca9 Merge pull request #458 from barelon/master
Use cascade=all if all cascade options set
2012-10-05 09:45:44 -07:00
Fran Moreno
45eef4a03c [SchemaValidator] Fix typo 2012-10-03 10:51:14 +03:00
barelon
919cf8558b Remove trailing whitespace 2012-10-02 00:16:29 +03:00
barelon
3b27216c51 add empty lines around if block 2012-10-02 00:14:24 +03:00
barelon
cd37ec47d5 Set 'cascade' => 'all' if all cascade options set 2012-09-30 01:16:21 +03:00
barelon
c97eff94f5 Output cascade={"all"} if all cascade options set 2012-09-30 01:12:06 +03:00
Marcin Radziwoński
380f4fbac7 Fixed unique-constraint name in XML Exporter 2012-09-26 14:27:16 +02:00
Konstantin Kuklin
34d8843fd6 improve phpdoc 2012-09-21 03:20:06 +04:00
Asmir Mustafic
bc277c6e28 spaces 2012-09-13 11:04:23 +02:00
Asmir Mustafic
f86dcfc288 typo fix 2012-09-13 09:40:14 +02:00
Cas
de5b20d0bf Update lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Allow 'nullable' attribute to be exported for fields, something which already worked in YamlExport. This addition saved me a lot of time during development, not having to manually re-factor after each export.

Don't know why this was missing, maybe it's me who is missing something, so let me know ;)
2012-09-13 03:43:27 +03:00
Benjamin Eberlei
bc2476f342 [DDC-1918] Fix weird results at the end of paginator when using fetch joins 2012-08-29 15:16:07 +02:00
Benjamin Eberlei
bcbef5670c Merge branch 'DDC-1939' 2012-07-29 09:27:20 +02:00
Christophe Coevoet
cebb820030 Added the new DBAL 2.3 types in the EntityGenerator typehint map 2012-07-27 10:34:59 +02:00
Marco Pivetta
aa0cb0b6d7 DDC-1939 - Removing references to non-existing AssociationMapping class 2012-07-24 11:37:57 +02:00
Christophe Coevoet
a723b73929 Changed commands to use command.name in the help 2012-07-17 00:55:09 +02:00
Benjamin Eberlei
fe292cc503 Merge pull request #392 from widop/patch-1
Invalid paginator query cloning
2012-07-08 09:34:09 -07:00
Marco Pivetta
346e34adf6 Reverting to default annotation driver with - delayed to 3.0 2012-07-08 17:33:50 +02:00
Marco Pivetta
245d906ebf Adding parameter to allow switching annotation reader implementation 2012-07-08 17:17:32 +02:00
Eric GELOEN
8c24e528ad Clone directly the ArrayCollection instead of looping 2012-07-07 11:38:53 +02:00
Eric GELOEN
996e47bf61 Replaced a shallow-copy with a deep-copy to avoid side effects. 2012-07-06 17:49:03 +02:00
Guilherme Blanco
6ba205f561 Merge pull request #314 from Ocramius/dcom-metadata-drivers-reuse
Doctrine\Common metadata drivers reuse
2012-07-04 13:30:54 -07:00
Benjamin Eberlei
30e86f442f [DDC-1907] Fix template variable placeholder 2012-07-04 21:30:25 +02:00
Benjamin Eberlei
5cdb0ae8be [DDC-1907] Add generation of remove method for collections 2012-07-04 21:04:47 +02:00
Marco Pivetta
245718c9eb Removing AbstractFileDriver, using Doctrine\Common\Persistence\Mapping\Driver\FileDriver instead 2012-07-04 20:59:21 +02:00
Tiago Ribeiro
bda7310b46 Added an empty line feed preceding the return statement 2012-07-03 12:57:14 +02:00
Douglas Greenshields
53e735ffdd fixed typo in command help text 2012-07-02 18:01:57 +01:00
Guilherme Blanco
cb72219b11 Merge pull request #372 from FabioBatSilva/DDC-1845
[DDC-1845] QuoteStrategy
2012-06-24 20:36:54 -07:00
Fabio B. Silva
ca4862aabc Fix CS 2012-06-23 14:19:47 -03:00
Fabio B. Silva
d3d97e7ef8 remove svn markers 2012-06-19 15:27:41 -03:00
Fabio B. Silva
85b6f8dc2f change quote strategy to interface 2012-06-18 14:43:00 -03:00
Fabio B. Silva
debc6e4993 change QuoteStrategy#getJoinColumnName to use join column 2012-06-18 14:42:58 -03:00
Fabio B. Silva
2afe24f51c start to work in xxToOne quote 2012-06-18 14:42:58 -03:00
Fabio B. Silva
a75c672ee7 fix sequence and join columns 2012-06-18 14:42:57 -03:00
Fabio B. Silva
8fec73673d fix DDC-1719 in persiter and query level 2012-06-18 14:42:56 -03:00
Fabio B. Silva
4ef3d99770 use quote strategy in SizeFunction, MultiTableDeleteExecutor, MultiTableUpdateExecutor, and SchemaTool 2012-06-18 14:42:56 -03:00
Guilherme Blanco
27b4f58b66 Merge pull request #362 from odolbeau/cs
Correct some mistakes (tabs & trailing spaces)
2012-06-14 22:43:18 -07:00
Włodzimierz Gajda
b263a00eac Entities generator: constructor's template docblock 2012-06-06 08:44:25 +02:00
Olivier Dolbeau
7ca0ac289e Remove tabs & trailing spaces 2012-06-05 15:46:10 +02:00
Olivier Dolbeau
c98f9117c2 Remove unused use 2012-06-05 15:39:52 +02:00
Benjamin Eberlei
1f2ce21b56 [DDC-1497] Change EntityGenerator add method generation for collections. 2012-05-27 20:31:01 +02:00
Benjamin Eberlei
04b23dbf10 [DDC-1798] Exporter generate error when composite primary key is generated. Fixes GH-342 2012-05-27 18:44:31 +02:00
Benjamin Eberlei
3398d1e287 [DDC-1685] Fix bug in OutputWalker when used on entities with Foreign Key as Primary Key. 2012-05-27 18:33:35 +02:00
Benjamin Eberlei
f55b5411c8 [DDC-1791] Fix OutputWalker Pagination on Oracle 2012-05-27 13:22:48 +02:00
Benjamin Eberlei
548c997f7b [DDC-1799] Fix bug in YamlExporter using OneToOne instead of ManyToOne 2012-05-27 09:57:46 +02:00
Benjamin Eberlei
70458b2f48 LGPL => MIT 2012-05-26 14:37:00 +02:00
Benjamin Eberlei
e2d15c3a04 Merge pull request #353 from pscheit/patch-1
prevent the validator to stop with an "undefined array index"-error
2012-05-22 10:09:01 -07:00
Philipp Scheit
e9f936c0ba don't call exit() in execute() 2012-05-22 14:25:54 +03:00
Philipp Scheit
f1571aeac3 prevent the validator to stop with an "undefined array index"-error while validating a wrong inversedBy Attribute 2012-05-21 19:23:22 +03:00
Fabio B. Silva
e9974911fe fix tests 2012-05-04 21:13:20 -03:00
Fabio B. Silva
67f0722211 change test to uses data provider 2012-05-04 21:13:19 -03:00
Fabio B. Silva
790d98133c fix DDC-1694 2012-05-04 21:11:51 -03:00
Fabio B. Silva
9b02745cd8 Fix DDC-1784 2012-04-18 20:39:21 -03:00
Benjamin Eberlei
193ac077d6 Merge pull request #316 from fixe/patch-1
Fixes autoloading of generated Annotations
2012-04-16 09:48:50 -07:00
Osman Üngür
e69b022472 Fixed CS 2012-04-02 12:11:38 +03:00
Osman Üngür
4fc7389b1d New cache driver definition for Doctrine running in non-dev mode and cache driver is not set.
This cache driver was added with doctrine/common#109
2012-04-02 11:57:09 +03:00
Tiago Ribeiro
975f3c4600 Fixes autoloading of generated Annotations 2012-04-01 02:59:03 +02:00
Benjamin Eberlei
ab15528fde Fix CS: AS => as in foreach loops. 2012-03-24 11:16:32 +01:00
Hugo Hamon
c0620bf857 [Tools] removed unused local variable $assocName in ResolveTargetEntityListener class. 2012-03-24 11:07:41 +01:00
Hugo Hamon
ffa372a76c [Tools] removed unused local variable in YamlExporter class. 2012-03-24 11:07:41 +01:00
Hugo Hamon
505537d4ce [Tools] renamed AS to as in EntityGenerator class. 2012-03-24 11:07:41 +01:00
Hugo Hamon
68806aa8c6 [Tools] removed unused local variable $idHash in DebugUnitOfWorkListener class and renamed AS keywords to as. 2012-03-24 11:07:41 +01:00
Hugo Hamon
aca1470e6b [Tools] removed unused local variable $cm in InfoCommand class. 2012-03-24 11:07:40 +01:00
Rivaros
df82b6060b Convention fixes 2012-03-14 21:38:43 +01:00
Rivaros
06eed4cfda Primary Keys as Foreign Keys - reverse engineering 2012-03-14 21:38:33 +01:00
Sander Marechal
53ff312936 Renamed *SqlWalker to *OutputWalker 2012-03-12 08:33:35 +01:00
Sander Marechal
ad871e8b26 Cleaned up use statements 2012-03-08 09:41:35 +01:00
Sander Marechal
d2501a9e4a Throw exception when using the CountWalker with a HAVING query 2012-03-07 08:42:09 +01:00
Sander Marechal
edd5d14b06 Pagination using SQL walkers
A CountSqlWalker and LimitSubquerySqlWalker have been implemented. By
default the Paginator will use these SQL walkers. When a query already
uses custom SQL walkers, the Paginator will fall back to the existing
TreeWalker implementations. Improvements:

* Support for more complex DQL queries using named mixed results with
  GROUP BY and HAVING. For example:

  SELECT g, u, COUNT(u.id) AS userCount
      FROM Entity\Group g LEFT JOIN g.users u
      GROUP BY g.id
      HAVING userCount > 0

* Support for entities with composite primary keys in the CountSqlWalker
  and LimitSubquerySqlWalker. Only the WhereInWalker still needs to be
  updated for full composite primary key support. But someone smarter
  than me needs to look at that and figure out how to build a WHERE IN
  query that can select rows based on multiple columns.
2012-03-06 16:24:44 +01:00
Brikou CARRE
e130df4f42 According to "Doctrine's implicit CS" and "Symfony's implicit CS" an empty line added to the end of the file (...same tweaks like the one pushed for the entity generator) 2012-03-04 09:43:52 +01:00
Brikou CARRE
cb2c71b16a According to "Doctrine's implicit CS" and "Symfony's implicit CS" an empty line added to the end of the file 2012-03-02 09:57:24 +01:00
Guilherme Blanco
48dcee9d60 [DDC-1616] Removed non-SQL message and improve exportability of SchemaTool CreateCommand. 2012-02-22 01:19:01 -05:00
Benjamin Eberlei
dbd646b2de [DDC-1649] Fix notice by last commit. 2012-02-20 15:55:19 +01:00
Benjamin Eberlei
502585bf40 [DDC-1649] Add additional check for not allowed mapping of dependent association keys. 2012-02-20 15:55:18 +01:00
Benjamin Eberlei
5d352389b7 Merge pull request #270 from bmichotte/master
Fluent interface and relations
2012-02-20 00:24:07 -08:00
Asmir Mustafic
d1b2dabc0f nullable assoc 2012-02-15 12:43:55 +01:00
Fabio B. Silva
5d01123413 Fix DDC-807, DDC-553 2012-02-13 23:22:49 -02:00
Benjamin Eberlei
3c4d2cd890 Merge pull request #253 from mrmkrs/protectedfields
enable set visibilty of class fields in EntityGenerator
2012-01-28 13:13:37 -08:00
Benjamin Eberlei
120bad8a2c Merge pull request #262 from wrightlabs/patch-1
added optional Command array as parameter for run method
2012-01-28 13:12:50 -08:00
Benjamin Eberlei
359a9c015b Merge pull request #196 from goetas/manyidx
Added some improvments for generated XML
2012-01-28 13:11:22 -08:00
Benjamin Eberlei
2ce705ceb3 Merge pull request #272 from jsor/table_options
Implement custom options on table level and complete column options implementation
2012-01-28 12:56:19 -08:00
Benjamin Eberlei
551df4af52 [DDC-1617] Implement support for Generating Unique Constraints/Indexes in @Table annotation of EntityGenerator. 2012-01-28 11:16:36 +01:00
Jan Sorgalla
d68fcd8bd2 Implement custom options on table level 2012-01-26 15:05:26 +01:00
Benjamin Michotte
1d2f46bda7 Add fluent code for relations 2012-01-24 19:08:25 +01:00
Sander Marechal
5dc0081f56 Add support for paginating WHERE NOT ... queries
The Pagination tool throws an exception on a DQL query like:

SELECT u FROM User u WHERE NOT (u INSTANCE OF Person)

This is because Paginate does not know about the
Doctrine\ORM\Query\AST\ConditionalFactor which implements the NOT
operator. This patch adds support for that.
2012-01-23 15:42:41 +01:00
Benjamin Eberlei
775071e1ff [DDC-1613] Merge KnpLabs/Pagerfanta Pagination into a Doctrine\ORM\Tools\Pagination namespace. Thanks to @hobodave, pablo and the knplabs team for developing and maintaining this code. 2012-01-22 13:35:06 +01:00
Benjamin Eberlei
0f3abde413 [DBAL-204] Filter namespaced assets if Schemas/Emulation is not supported. 2012-01-21 11:31:54 +01:00
John Wright
543c73bc05 added optional command array as parameter for run method 2012-01-16 21:01:44 -08:00
armetiz
21c9be74c9 Update lib/Doctrine/ORM/Tools/SchemaTool.php 2012-01-16 13:54:04 +01:00
armetiz
56c49fedd2 Unique key name isn't correctly set - DDC-1603 2012-01-16 10:30:15 +01:00
Benjamin Eberlei
27451a59d4 Merge pull request #254 from jsor/custom_options
Pass options attribute in @Column annotation to Schema\Column's customSchemaOptions
2012-01-15 09:06:46 -08:00
Benjamin Eberlei
106f10513f [DDC-1601] Fix bugs in SchemaValidator, using all modelsets as testdata for a large test 2012-01-15 11:27:52 +01:00
Marcel
f76d327413 use self:: instead of EntityGenerator:: 2012-01-13 14:43:13 +01:00
Marcel
72d5d0281a use !== to check field visibility
use class constants
2012-01-13 14:34:34 +01:00
Marcel
69f0d70a98 fix if coding standard
fix typo
2012-01-13 14:14:28 +01:00
Marcel
f26d43b3ea remove whitespace
tabs -> spaces
added class constants
updated phpdoc
2012-01-13 11:24:35 +01:00
Benjamin Eberlei
c1dae35a24 Fix notice when using regenerate if exists and file is not new. 2012-01-12 11:20:49 +01:00
jsor
615e22073f Pass options attribute in @Column annotation to Schema\Column's customSchemaOptions 2012-01-11 15:58:57 +01:00
Marcel Raaijmakers
facd64ef2f enable set visibilty of class fields in EntityGenerator 2012-01-06 16:58:27 +01:00
Benjamin Eberlei
76e4f5a80b DCOM-93 - Removed reflection dependency from ClassMetadata completly, moving all the code into ClassMetadataInfo for BC reasons. 2012-01-02 21:32:18 +01:00
Benjamin Eberlei
ea2d4e4282 DCOM-93 - Add ClassMetadataFactory#wakeupReflection implementation 2012-01-02 15:46:20 +01:00
holtkamp
21cfe4ba9f Allow ExporterDrivers that implement the exportClassMetadata() function to return FALSE when no content is available/needs to be written to a file by the AbstractExporter, preventing empty files to be generated foreach processed ClassMetadataInfo instance. 2011-12-28 09:03:00 +01:00
Benjamin Eberlei
cd6131c9b8 Remove all trailing whitespaces 2011-12-19 22:56:19 +01:00
Benjamin Eberlei
40800bd3cd DDC-1530 - Validate field types in SchemaValidator 2011-12-19 10:11:11 +01:00
Benjamin Eberlei
072094f722 DDC-1368 - Fix tests 2011-12-17 23:38:39 +01:00
Benjamin Eberlei
170271fd72 DDC-1368 - Improve schema validator 2011-12-17 23:27:39 +01:00
Evan Coury
36a47e391c DDC-1544 - Add unit test and assertions for ResolveTargetEntityListener 2011-12-17 15:00:05 -07:00
Benjamin Eberlei
267ce7df88 DDC-1544 - Add ResolveTargetEntityListener 2011-12-17 19:35:10 +01:00
Asmir Mustafic
289c186de5 orphanRemoval default is false 2011-12-16 16:16:52 +01:00
Andrew Mackrodt
2fdb55a878 Added absolute namespace paths to phpdoc annotations - issue DDC-1025. 2011-12-11 21:56:26 +00:00
Guilherme Blanco
2f6b930a8d Implemented missing support in CollectionMemberComparison. Removed old todo in ArrayHydrator. Finished implementation of IdentificationVariable in ArithmeticPrimary. 2011-12-03 15:19:21 -05:00
Benjamin Eberlei
0d4e0626cf Merge pull request #158 from goetas/cascade-all
Collapsed cascade elements, if cascade-all.
2011-11-18 06:49:40 -08:00
Asmir Mustafic
24432bd0ab tabs 2011-11-18 11:00:20 +01:00
Asmir Mustafic
82a1626e82 Better generation of exported xml (valid with xsd) 2011-11-18 10:57:27 +01:00
Benjamin Eberlei
64b649ef61 Merge pull request #160 from goetas/generation
Allow to unset one-to-one relation with generated class
2011-11-13 07:53:58 -08:00
Benjamin Eberlei
f7c46c7b33 DDC-1491 - Fix Schema Validator bug 2011-11-13 15:45:06 +01:00
Benjamin Eberlei
c965d231b1 Rename method and refactor code a bit 2011-10-31 23:21:11 +01:00
Benjamin Eberlei
e31e164896 DBAL-1420 - Use safe mode for schema validation. Dropping stuff isnt necessary here. 2011-10-31 23:12:52 +01:00
Benjamin Eberlei
11f82bd41f DDC-1439 - Fix validate mapping some more 2011-10-31 20:49:59 +01:00
Benjamin Eberlei
64d405f7dd Merge origin/master into DDC-1384 2011-10-30 12:12:18 +01:00
Benjamin Eberlei
30731e0727 DDC-1384 - Fix all tests on Oracle 2011-10-29 23:58:09 +02:00
Asmir Mustafic
d09285e9d3 Collapse cascade all test (YAML too) 2011-10-26 10:59:15 +02:00
Asmir Mustafic
7efd615b8c Coding standards 2011-10-24 12:00:11 +02:00
Asmir Mustafic
5f80b57554 Improoved coding standards 2011-10-24 10:19:01 +02:00
Asmir Mustafic
1b83fcc46d Coding standards 2011-10-24 09:20:24 +02:00
Asmir Mustafic
d4059b88ca Nullable relations, fixing join condition 2011-10-21 15:30:21 +02:00
Asmir Mustafic
fe84a61d0b Better code generation when association is nullable 2011-10-21 09:38:37 +02:00
Asmir Mustafic
596ba3d5b1 Collection inteface instead of ArrayCollection 2011-10-19 15:04:16 +02:00
Asmir Mustafic
be3adfb35e With TO_MANY relations, class filed is instanceof ArrayCollection,
instead of targetEntity class type.
2011-10-19 09:25:40 +02:00
Asmir Mustafic
8f092812c4 Spaces 2011-10-19 09:17:30 +02:00
Asmir Mustafic
9c1202a766 Added <variableDefault> on generated class.
This allow to unset many-to-one and one-to-one relations


Example: $user->setGroup(null);
2011-10-19 09:15:41 +02:00