Bill Schaller
4b10db3a43
Fix crashes in ConvertMappingCommand and GenerateEntitiesCommand when using entities with joined table inheritance
...
ConvertMappingCommand and GenerateEntitiesCommand both use the DisconnectedClassMetadataFactory, which allows metadata manipulation without loading the associated classes. Commit a36bea broke these two commands by adding a bailout condition in ClassMetadataFactory::populateDiscriminatorValue which checks $metadata->reflClass->isAbstract(). If the DisconnectedClassMetadataFactory is being used, $metadata->reflClass will always be null, causing a fatal error, "Fatal error: Call to a member function isAbstract() on null".
This commit adds a check to see if $metadata->reflClass is set before checking isAbstract.
2015-03-20 13:59:27 -04:00
Benjamin Eberlei
b3a6fb7fde
[DDC-3461] Renamed AssocationBuilder::isPrimaryKey() to makePrimaryKey(). Same for FieldBuilder and depreceating isPrimaryKey(). Adjust tests. Revert change in ClassMetadataInfo and fix bug.
2015-03-18 17:06:30 +01:00
Marco Pivetta
648fde8914
#1316 - removing useless null
check (redundant with isset()
), cs cleanups
2015-03-17 23:16:16 +00:00
molchanoviv
f244db80fb
Allow to join non-public schema tables
2015-03-17 23:03:03 +00:00
Marco Pivetta
73d4d88ba1
Merge pull request #1326 from guiwoda/orphan-removal-association-builder
...
Allow AssociationBuilder to set a relation as orphan removal
2015-03-09 23:18:59 +01:00
Guido Contreras Woda
71821bb7a3
Allow AssociationBuilder to set a relation as orphan removal
2015-03-09 18:54:35 -03:00
Jan Kramer
f09b9895b6
Fix embeddable instantiation in nested situations
2015-02-27 15:09:58 +01:00
Guilherme Blanco
4680a7b861
Fixed bug where embedded reflection fields were never exposed to userland.
2015-02-20 14:10:28 -05:00
Marco Pivetta
1f67218dc5
#1229 - code style fixes (alignment/spacing)
2015-02-16 02:06:22 +00:00
Guido Contreras Woda
51881fed94
Added tests and validation on joinColumns being set before checking if its a composite key.
2015-02-16 02:02:29 +00:00
Guido Contreras Woda
cd728344e9
Allow an association to be set as primary key through the builder
2015-02-16 02:02:29 +00:00
Ryan Weaver
0e08633790
Adding docblock
2015-02-04 13:51:02 -05:00
Ryan Weaver
75bb3a0de3
Small code change thanks to the comments and adding a test
2015-02-04 13:49:51 -05:00
Ryan Weaver
b30d1dd39c
Only getting the target platform when it's *actually* needed to avoid errors
...
initialize() is called sometimes, even when the following code doesn't need
the targetPlatform property. Specifically, in AbstractClassMetadataFactory::getAllMetadata().
But as of DBAL 2.5.0, calling Connection::getDatabasePlatform() will make a
connection to the database, which means that sometimes it may fail (e.g. you
haven't configured your database yet). As a result, calling a method like
AbstractClassMetadataFactory::getAllMetadata() - which does not need the
targetPlatform - will fail, because determining the targetPlatform requires
a connection, which fails.
This avoids that - we only get the targetPlatform *when* we need it, which
are cases where we're doing things that do indeed need a connection.
2015-01-28 20:17:28 -05:00
Marco Pivetta
17a23ea825
Merge pull request #1222 from guiwoda/embeddables-in-metadata-builder
...
Embeddables in metadata builder
2015-01-28 22:25:10 +00:00
Marco Pivetta
28e0da4321
#1272 DDC-2704 - reverting classmetadata API changes (moved all to reflection property getter API)
2015-01-24 14:32:23 +01:00
Marco Pivetta
1aa453d493
#1272 DDC-2704 - property getter utility is package private
2015-01-24 14:29:40 +01:00
Marco Pivetta
5ec300452a
#1272 DDC-2704 - implementation for a property getter utility
2015-01-24 14:29:09 +01:00
Marco Pivetta
885700d38c
DDC-2704 - should initializeAllReflectionProperties
also on initializeReflection
2015-01-24 13:22:16 +01:00
Marco Pivetta
a4982a8dc2
DDC-2704 - handling partial initialization of the class as expected (class metadata may not hold reflection class after wakeup)
2015-01-24 13:22:15 +01:00
Marco Pivetta
0a3d6966d6
DDC-2704 - providing hotfix - also storing inherited transient properties in the class metadata
2015-01-24 13:22:15 +01:00
Marco Pivetta
cd3ffa8f14
#1130 DDC-3300 - removing typo causing parse error
2015-01-22 09:44:40 +01:00
Marco Pivetta
e969a6be85
#1130 DDC-3300 - rewording and clarifying logic that re-maps discriminator values when needed
2015-01-22 09:44:39 +01:00
Marco Pivetta
a36bea2951
#1130 DDC-3300 - optimizing performance (looping over existing classes first): throwing exceptions if the class is not found in the discriminator map
2015-01-22 09:44:39 +01:00
Marco Pivetta
8579baf28c
#1130 DDC-3300 - minor refactoring (else
removal, spacing)
2015-01-22 09:44:39 +01:00
Marco Pivetta
786c34faa5
#1130 DDC-3300 - refactoring auto-remapping of discriminator value into a private method
2015-01-22 09:44:38 +01:00
Marco Pivetta
c589b5d013
#1130 DDC-3300 - re-mapping discriminator column at runtime (based on modified class metadata)
2015-01-22 09:44:38 +01:00
mmoreram
7a73d27600
Added resolve entities support in discrim. map
2015-01-22 09:44:38 +01:00
Marco Pivetta
025565005d
#1252 DDC-3496 - reverting interface BC break
2015-01-18 00:11:47 +01:00
Marco Pivetta
369a9934a5
#1252 DDC-3496 - moving stub naming strategy to tests directory
2015-01-18 00:07:54 +01:00
Jack Sleight
60523d1b62
Update docblock for joinColumnName to include className details
2015-01-17 23:57:52 +01:00
Jack Sleight
be9d92bb26
Example NamingStrategy for using class name in join column names.
2015-01-17 23:57:52 +01:00
Jack Sleight
82163a3301
Include className in calls to NamingStrategy joinColumnName method.
2015-01-17 23:57:52 +01:00
Marco Pivetta
1e606d1ed3
#1178 - adding note about ClassMetadataInfo#getTypeOfColumn()
being unreliable/dangerous
2015-01-17 07:59:01 +01:00
Marco Pivetta
935a79e15f
#1133 DDC-3305 - minor cs fix (spacing)
2015-01-16 19:46:04 +01:00
Marco Pivetta
7e4dab17ec
#1133 DDC-3305 - test case with embeddable without referenced embeddable class
2015-01-16 19:45:16 +01:00
Javier Spagnoletti
705a7d2cc2
[Embeddables] Improved exception message when embeddables is missing 'class' attribute.
2015-01-16 19:18:46 +01:00
Marco Pivetta
3ba9689448
#881 DDC-2825 - aligning assignments
2015-01-14 18:19:22 +01:00
Marco Pivetta
f0102a69f9
#881 DDC-2825 - refactoring mapping driver to use ClassMetadata#setPrimaryTable()
instead of duplicating explode()
logic
2015-01-14 18:12:12 +01:00
Marco Pivetta
eefa3b2e53
#881 DDC-2825 - correcting YAML driver implementation (wasn't using extracted schema)
2015-01-14 18:06:29 +01:00
Marco Pivetta
51bf82b7e7
#881 DDC-2825 - correcting PHP mapping behavior when using implicit schema in table name
2015-01-14 17:54:00 +01:00
Marco Pivetta
3820fa57d3
#881 DDC-2825 - XML mappings should handle explicitly defined schema name
2015-01-14 17:33:17 +01:00
Michaël Perrin
54b3c0548d
Fix persistence exception on a table with a schema on a platform without schema support
2015-01-14 15:48:49 +01:00
Marco Pivetta
8ea394e778
#385 #1181 DDC-3385 - removing @todo
that was discussed/cleared
2015-01-13 20:33:10 +01:00
Marco Pivetta
a710706c81
#385 #1181 DDC-3385 - optimized imports, removing duplicate imports (caused by rebase conflicts)
2015-01-13 20:00:40 +01:00
Marco Pivetta
e4cbdb57ad
Enabling fallback logic in metadata loading
2015-01-13 19:50:55 +01:00
Andrey Knupp Vital
08e8af9372
Type-hinting SimpleXMLElement
(_getCascadeMappings)
2015-01-08 09:28:15 -02:00
Andrey Knupp Vital
b90943c56b
Minor improvements
2015-01-08 09:04:37 -02:00
Andrey Knupp Vital
4935da138d
Respecting use-column-prefix
instead of relying on false/0 of column-prefix
2015-01-08 00:10:24 -02:00
Andrey Knupp Vital
8bbc492978
Removing weird strict comparison on different types
2015-01-07 17:24:44 -02:00