PHPackages                             assegaiphp/orm - 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. assegaiphp/orm

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

assegaiphp/orm
==============

AssegaiORM is an ORM written in modern PHP. It supports both Active Record and Data Mapper patterns. AssegaiORM is highly influenced by other ORMs, such as TypeORM, Doctrine and Entity Framework.

0.7.8(1mo ago)0260↓100%MITPHPPHP &gt;=8.3CI failing

Since Aug 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/assegaiphp/orm)[ Packagist](https://packagist.org/packages/assegaiphp/orm)[ RSS](/packages/assegaiphp-orm/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (72)Used By (0)

 [![Assegai Logo](https://camo.githubusercontent.com/d7dab2658d76e460e31be249de2fe5d420f7a7237eb9f2a315f83123632a3b6c/68747470733a2f2f617373656761697068702e636f6d2f696d616765732f6c6f676f732f6c6f676f2d63726f707065642e706e67)](https://assegaiphp.com/)

A progressive PHP framework for building efficient and scalable server-side applications.

Description
-----------

[](#description)

An object-relational mapper for [AssegaiPHP](https://github.com/assegaiphp).

Installation
------------

[](#installation)

```
$ composer require assegaiphp/orm
```

Guide map
---------

[](#guide-map)

This package is designed to feel familiar to teams coming from TypeORM:

- entities describe persistence shape
- repositories are injected into services
- data sources decide where a feature reads and writes
- relations are explicit and ownership matters
- migrations evolve the schema deliberately

In the main Assegai guide set, the ORM track is:

- `core/docs/data-and-orm.md`
- `core/docs/orm-setup-and-data-sources.md`
- `core/docs/orm-entities-repositories-and-results.md`
- `core/docs/orm-relations.md`
- `core/docs/orm-migrations-and-database-workflows.md`

Quick Start
-----------

[](#quick-start)

[Overview &amp; Tutorial](https://assegaiphp.com/guide/fundamentals/orm)

Using SQLite
------------

[](#using-sqlite)

SQLite is a good fit for local development, small apps, prototypes, and CLI tools. This ORM supports SQLite through PDO, so the first step is to register a named SQLite connection in your app config.

Make sure the `pdo_sqlite` extension is enabled and that the folder for your database file already exists. The configured `path` should be relative to your project's working directory.

```
