PHPackages                             baraja-core/doctrine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. baraja-core/doctrine

ActiveLibrary[Database &amp; ORM](/categories/database)

baraja-core/doctrine
====================

Doctrine port to Nette 3.0 with maximal performance.

v3.7.5(1y ago)13276.7k3[2 issues](https://github.com/baraja-core/doctrine/issues)[1 PRs](https://github.com/baraja-core/doctrine/pulls)20PHPPHP ^8.0CI failing

Since Jul 12Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/baraja-core/doctrine)[ Packagist](https://packagist.org/packages/baraja-core/doctrine)[ Docs](https://github.com/baraja-core/doctrine)[ RSS](/packages/baraja-core-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (102)Used By (20)

   ![BRJ logo](https://camo.githubusercontent.com/813c67e02a7ab7e4dc900316a4521c3ddf5846fe2cabba7140f3f4b78afda198/68747470733a2f2f63646e2e62726a2e6170702f696d616765732f62726a2d6c6f676f2f6c6f676f2d6461726b2e706e67)
 [BRJ organisation](https://brj.app)

---

Baraja Doctrine Database
========================

[](#baraja-doctrine-database)

[![Integrity check](https://github.com/baraja-core/doctrine/workflows/Integrity%20check/badge.svg)](https://github.com/baraja-core/doctrine/workflows/Integrity%20check/badge.svg)

A simple and easy to use, maximum performance database layer with connection to Doctrine ORM, which allows you to use all the advantages of OOP and also has **full support for Nette 3**.

This package automatically installs Doctrine to your project (also sets everything up in the configuration) and runs stably.

Key Features
------------

[](#key-features)

- Full Doctrine ORM integration with Nette Framework 3.x
- Automatic configuration and setup via DI extensions
- Advanced Tracy debug panel with SQL query profiling
- Built-in UUID and UUID Binary identifier traits
- Custom DQL functions (RAND, ROUND, GEODISTANCE, MATCH AGAINST)
- Multiple caching strategies (APCu, SQLite3, Filesystem)
- Slow query logging and analysis
- Entity inheritance support with discriminator mapping utilities
- Blue Screen exception panels for detailed error debugging

Architecture Overview
---------------------

[](#architecture-overview)

```
+------------------+     +-------------------+     +------------------+
|   Nette DI       |---->| DatabaseExtension |---->| EntityManager    |
|   Container      |     | OrmExtension      |     | (Doctrine)       |
+------------------+     | OrmAnnotations    |     +------------------+
                         +-------------------+              |
                                  |                         v
                         +-------------------+     +------------------+
                         | ConnectionFactory | **Important warning:**
>
> The value of the `%rootDir%`, `%appDir%`, `%wwwDir%`, `%vendorDir%` and `%tempDir%` parameters may be corrupted when running schema generation in CLI mode. To resolve this mistake, please install [Package Manager](https://github.com/baraja-core/package-manager) and call the command as a `composer dump`.

---

Entity Identifiers
------------------

[](#entity-identifiers)

The package provides several traits for entity identification. Insert one trait to define the ID in your entities:

### Auto-increment Integer

[](#auto-increment-integer)

```
