Releases: Kdyby/Doctrine
v3.0.0
- Fixed tracy panel styles (and stolen SVG icon from nette/database)
- Remove
LIMIT 1
forEntityRepository::fetchOne()
by @jasin755 (BC Break - but it fixes when you're selecting toMany with join) EntityRepository::countBy()
now returns integer type by @richard-ejem- Fix extension methods in BaseEntity & MagicAccessors (
Nette\Callback
is deprecated) - QueryBuilder: auto join
ORDER BY
can sort by aggregation function result by @EaredSeal - Add configuration for default query hints by @davidkudera
- Added
Kdyby\Doctrine\Entity\Attributes\UniversallyUniqueIdentifier
trait by @klimesf - Fix
RobotLoader::initialize()
is incorrectly called for everytryLoad()
by @lm (relevant to proxy autoloading) - Panel: Improved highlightQuery method by @enumag
- RepositoryFactory: implemented handling of repositories as services (big feature, possibly might break some apps that already use this in some hackish way)
NonLockingUniqueInserter
supports single table inheritance by @mkoubik- Deprecate
BaseEntity
& introducedMagicAccessors
that returns read-only collections from getters of collection properties. Otherwise, it's compatible withBaseEntity
. - Deprecate
EntityManager::onDaoCreate()
- DI: no longer autoregister
AnnotationsExtension
, but throw instead (Nette deprecated this feature) - Remove custom
--debug-mode
from CLI commands (compatibility with Kdyby/Console#v2.5.0 ) - Introduce
NativeQueryBuilder::setDefaultRenameMode()
- Fixed clearing annotations cache
- Implemented
LazyCollection
(might wanna push this to doctrine/common some day) - Preserve associative keys in
ResultSet::toArray()
- Fix nested iterations over
ResultSet
ReadOnlyCollectionWrapper
implementsDoctrine\Common\Collections\Selectable
- Render
UnitOfWork
panel when exception occurs duringEntityManager->flush()
- Catch warnings in
Connection::ping()
- EntityRepository: fetch with different hydration mode by @VaclavSir
- Panel: highlight
Doctrine\DBAL\Exception\DriverException
- Fix contract BC Break in
QueryBuilder
by extractingInlineParamsBuilder
(BC Break - if you're using inline parameters in QB->andWhere('e.name = :name', $name)
you have to re-enable it manually in config withqueryBuilderClassName: Kdyby\Doctrine\Dql\InlineParamsBuilder
). Also, you can now configure your own child ofQueryBuilder
as defaultQueryBuilder
. - Add
QueryObject::onPostFetch()
to allow multiple initializers - Drop PHP 5.3
- Panel: show cache statistics for 2nd level cache, if it's enabled
- DI: basic 2nd lvl cache config section
- The custom
Events::postLoadRelations
is useless in Doctrine 2.5, so everything related to it is removed and the event isdeprecated
- possible BC Break - Require doctrine/orm ~2.5
This release is for Nette ~2.3
v2.3.1
- QueryBuilder: refactor autojoin aliasing
- Fixed proxy autoloaders initialization by @enumag
- Fixed generating sql value for
POINT
andLINE_STRING
type by @brabijan - Nette 2.3 compatibility
- Dibi extension bridge for Nette 2.2 by @stekycz
- Implemented
EmptyResultSet
(for when you wanna returnResultSet
type, but without results) - QueryObject: created
postFetch
method - Connection: fixed duplicate creation of database platform by @matej21
This release is for Nette ~2.2
v2.3.0
- lock to doctrine 2.4, because 2.5 contains api bc breaks
- Deprecated
EntityDao::save()
andEntityDao::remove()
- Deprecated
EntityManager::getDao()
- implemented
RepositoryFactory
- Fixed lazy inicialization of database that broke with
doctrine/dbal: 2.5
- Use namespaced evm from
kdyby/events
. All events are now first dispatched with namespace Doctrine\ORM\Event, but don't worry, it contains a BC fix that also dispatches the old variant without namespace. After you migrate all your listeners to namespaced variant, you can disable the dispatchGlobalEvents to increase performance - fixed minor bugs
This release is for Nette ~2.2
v2.0.6
- lock to doctrine 2.4, because 2.5 contains api bc breaks
- Deprecated
EntityDao::save()
andEntityDao::remove()
- Deprecated
EntityManager::getDao()
- implemented
RepositoryFactory
- Fixed lazy inicialization of database that broke with
doctrine/dbal: 2.5
- Use namespaced evm from
kdyby/events
. All events are now first dispatched with namespace Doctrine\ORM\Event, but don't worry, it contains a BC fix that also dispatches the old variant without namespace. After you migrate all your listeners to namespaced variant, you can disable the dispatchGlobalEvents to increase performance - fixed minor bugs
This release is for Nette 2.1.*
v2.2.0
- [Soft BC Break] Minimum dependency on
doctrine/dbal 2.5
which means newDBAL\Connection
exceptions
New property Connection::$throwOldKdybyExceptions
was introduced, that enables the old behaviour of exceptions on Kdyby\Doctrine\Connection.
The new DBAL has much better exception resolution and throws specific exceptions, making the old behaviour obsolete.
The old behaviour is by default turned off, so you're pushed to migrating, but you can still turn it on.
services:
doctrine.default.connection:
setup:
- $throwOldKdybyExceptions(TRUE)
This property and related deprecated exceptions will be removed no later than with release of Doctrine\DBAL 2.6
- Fixed identifier quoting on shortcut methods insert/update/delete #64
- Dropped custom
Connection::ping()
(completely compatible native one is used) - Implemented
Persistence\ManagerRegistry
#140 - ClassMetadataFactory fix: add entity alias (which defined in targetEntityMappings) to the metadata map, thanks to @matej21
- Added
ResultSet::toArray()
shortcut
This release is for Nette 2.2.*
v2.0.5
- [Soft BC Break] Minimum dependency on
doctrine/dbal 2.5
which means newDBAL\Connection
exceptions
New property Connection::$throwOldKdybyExceptions
was introduced, that enables the old behaviour of exceptions on Kdyby\Doctrine\Connection.
The new DBAL has much better exception resolution and throws specific exceptions, making the old behaviour obsolete.
The old behaviour is by default turned off, so you're pushed to migrating, but you can still turn it on.
services:
doctrine.default.connection:
setup:
- $throwOldKdybyExceptions(TRUE)
This property and related deprecated exceptions will be removed no later than with release of Doctrine\DBAL 2.6
- Fixed identifier quoting on shortcut methods insert/update/delete #64
- Dropped custom
Connection::ping()
(completely compatible native one is used) - Implemented
Persistence\ManagerRegistry
#140 - ClassMetadataFactory fix: add entity alias (which defined in targetEntityMappings) to the metadata map, thanks to @matej21
- Added
ResultSet::toArray()
shortcut
This release is for Nette 2.1.*
v2.1.1
- Fixed problem with entity unserialization in PHP >=5.6 by using the doctrine/instantiator
- Added
Connection::ping()
This release is for Nette 2.2.*
v2.0.4
- Fixed problem with entity unserialization in PHP >=5.6 by using the doctrine/instantiator
- Added
Connection::ping()
This release is for Nette 2.1.*
v2.1.0
v2.0.3
- Fixed autoJoin with multiple conditions on the same relation
- Extracted and fixed
Helpers::separateParameters()
- Add support for subquery to
NativeQueryBuilder
, thx @pilec - Fixed configuring multiple connections
- Use Nette's RobotLoader in
AnnotationDriver
to search for entities, If you don't wanna use it, then instead of%appDir%/models
orannotations(%appDir%/models)
(which is default) you have to specify the default implementation classname
doctrine:
metadata:
App: Doctrine\ORM\Mapping\Driver\AnnotationDriver(%appDir%/models)
Why would you wanna do that? Well, the Doctrine's implementation just crawls a directory and requires everything that remotely resembles PHP file. If you happen to have some scripts laying around, they will be triggered. On the other hand, the Doctrine's implementation is about 10x faster.
On a directory with 800 files, the new implementation with RobotLoader
takes more than 10 seconds. On the other hand, the files are crawled only once at compile-time.