The best way to install Kdyby/Doctrine is using Composer:
$ composer require kdyby/doctrine
Learn more in the documentation.
Homepage http://www.kdyby.org and repository http://github.com/kdyby/doctrine.
The best way to install Kdyby/Doctrine is using Composer:
$ composer require kdyby/doctrine
Learn more in the documentation.
Homepage http://www.kdyby.org and repository http://github.com/kdyby/doctrine.
This release is for Nette 2.3.*
This release is for Nette ^2.4
Tracy\Debugger::$source
from FileLogger; thx @her-urThis release is for Nette ^2.4
Tracy\Debugger::$source
from FileLogger; thx @her-urThis release is for Nette 2.3.*
This release is for Nette ~2.3
(which means also ~2.4
).
v3.1.0
that people were not expecting. The commit will remain master untill v4.0 is tagged. So start fixing your deployment routines while it's time.This release is for Nette ~2.3
EntityRepository::countBy
MSSql bug #235, thx @josefzajacorm:generate-proxies
Container::onInitialize
event #263, thx @enumag - Kdyby/Doctrine should be able to work without Kdyby/Events, if you override the EventManager serviceThis release is for Nette ~2.3
QueryObject::fetchOne()
, as a better solution for the original problem with the limit, documented at QueryObject::fetchOne()This release is for Nette ~2.3
LIMIT 1
for EntityRepository::fetchOne()
by @jasin755 (BC Break - but it fixes when you're selecting toMany with join)EntityRepository::countBy()
now returns integer type by @richard-ejemNette\Callback
is deprecated)ORDER BY
can sort by aggregation function result by @EaredSealKdyby\Doctrine\Entity\Attributes\UniversallyUniqueIdentifier
trait by @klimesfRobotLoader::initialize()
is incorrectly called for every tryLoad()
by @lm (relevant to proxy autoloading)NonLockingUniqueInserter
supports single table inheritance by @mkoubikBaseEntity
& introduced MagicAccessors
that returns read-only collections from getters of collection properties. Otherwise, it's compatible with BaseEntity
.EntityManager::onDaoCreate()
AnnotationsExtension
, but throw instead (Nette deprecated this feature)--debug-mode
from CLI commands (compatibility with Kdyby/Console#v2.5.0 )NativeQueryBuilder::setDefaultRenameMode()
LazyCollection
(might wanna push this to doctrine/common some day)ResultSet::toArray()
ResultSet
ReadOnlyCollectionWrapper
implements Doctrine\Common\Collections\Selectable
UnitOfWork
panel when exception occurs during EntityManager->flush()
Connection::ping()
Doctrine\DBAL\Exception\DriverException
QueryBuilder
by extracting InlineParamsBuilder
(BC Break - if you're using inline parameters in QB ->andWhere('e.name = :name', $name)
you have to re-enable it manually in config with queryBuilderClassName: Kdyby\Doctrine\Dql\InlineParamsBuilder
). Also, you can now configure your own child of QueryBuilder
as default QueryBuilder
.QueryObject::onPostFetch()
to allow multiple initializersEvents::postLoadRelations
is useless in Doctrine 2.5, so everything related to it is removed and the event is deprecated
- possible BC BreakThis release is for Nette ~2.3
POINT
and LINE_STRING
type by @brabijanEmptyResultSet
(for when you wanna return ResultSet
type, but without results)postFetch
methodThis release is for Nette ~2.2
EntityDao::save()
and EntityDao::remove()
EntityManager::getDao()
RepositoryFactory
doctrine/dbal: 2.5
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 performanceThis release is for Nette ~2.2
EntityDao::save()
and EntityDao::remove()
EntityManager::getDao()
RepositoryFactory
doctrine/dbal: 2.5
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 performanceThis release is for Nette 2.1.*
doctrine/dbal 2.5
which means new DBAL\Connection
exceptionsNew 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
Connection::ping()
(completely compatible native one is used)Persistence\ManagerRegistry
#140ResultSet::toArray()
shortcutThis release is for Nette 2.2.*
doctrine/dbal 2.5
which means new DBAL\Connection
exceptionsNew 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
Connection::ping()
(completely compatible native one is used)Persistence\ManagerRegistry
#140ResultSet::toArray()
shortcutThis release is for Nette 2.1.*
Connection::ping()
This release is for Nette 2.2.*
Connection::ping()
This release is for Nette 2.1.*
Helpers::separateParameters()
NativeQueryBuilder
, thx @pilecAnnotationDriver
to search for entities, If you don't wanna use it, then instead of %appDir%/models
or annotations(%appDir%/models)
(which is default) you have to specify the default implementation classnamedoctrine:
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.
ClassMetadata::newInstance()
NativeQueryBuilder::addColumn()
Entities\Attributes\Identifier
trait to be used instead of IdentifiedEntity
NativeQueryBuilder
NativeQueryBuilder
in ResultSet
NativeQueryBuilder
NativeQueryBuilder
ReadOnlyCollectionWrapper
, thx @Majkl5782.1.*
CacheCleaner
$qb->andWhere('r.id = :id', $restaurantId);
HashHydrator
for hydrating Nette\Utils\ArrayHash
instead of array$result = $query->getResult(Hydration\HashHydrator::NAME);
namingStrategy
option.EntityRepository
extracted from EntityDao
. You can now change defaultRepositoryClassName
to Kdyby\Doctrine\EntityRepository
and ignore that you ever could call save()
on repository which was a bad idea to even begin with.--debug-mode
to cli commands [experiment]ResultSet::clearSorting()
orm:convert-mapping
and orm:generate-entities
, thx @foxycode::safePersist()
to work also with not autogenerated identifiers, thx @stekycz::safePersist()
, thx @stekyczEvents::postLoadRelations
that is called after result row hydratationautoGenerateProxyClasses
logging
optiondoctrine:
logging: %appDir%/../log/queries.sql
findBy()
, findPairs()
and findAssoc()
criteria filtering with autojoin and rich operators on DAOQueryBuilder::whereCriteria()
EntityManager
::clear()
, ::remove()
and ::persist()
api (accepts array and is fluent)JitProxyWarmer
~2.1@dev
2.0.*
ResultSet
from modifyingfindBy*()
methods on DAODao::save()
& Dao::add()
& Dao::delete()
has new $relations
parameter that can persistent entities of other types than only the type of current daoResultSet
for query without limit & offset doesn't use paginatorPanel::renderException()
handles SchemaException
ResultSet
from modifying