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

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

pedro151/orm-generator
======================

orm-generator maps the entire database and then creates the DAO (Data Access Object) and ORM (Object-relational mapping) of the entire database to facilitate the development. uses various types of databases like Postgres and Mysql and various types of ORM framework.

v1.6.2(9y ago)43451MITPHPPHP &gt;=5.3.0

Since Apr 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/pedro151/orm-generator)[ Packagist](https://packagist.org/packages/pedro151/orm-generator)[ RSS](/packages/pedro151-orm-generator/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (16)Used By (0)

orm-generator
=============

[](#orm-generator)

[![Travis build status](https://camo.githubusercontent.com/64d8d3326c384e8412bb471daa6d264005643263d8ae752a6024be250186b4c8/68747470733a2f2f6170692e7472617669732d63692e6f72672f706564726f3135312f6f726d2d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pedro151/orm-generator)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3157339d76e1eeb612eb1458b4ad521b9ed320edef4065c0f7d98e81b2573785/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706564726f3135312f6f726d2d67656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pedro151/orm-generator/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/9b9678a002502d4f5f343f05111ee895ccd0b8d8468c18fc5fc2666bb73df0b4/68747470733a2f2f706f7365722e707567782e6f72672f706564726f3135312f6f726d2d67656e657261746f722f762f737461626c65)](https://packagist.org/packages/pedro151/orm-generator)[![Total Downloads](https://camo.githubusercontent.com/49033f166c7a8549d2d93610d5f8db111ed335ca972b7c8f01060079a1fccd41/68747470733a2f2f706f7365722e707567782e6f72672f706564726f3135312f6f726d2d67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/pedro151/orm-generator)[![Latest Unstable Version](https://camo.githubusercontent.com/f9155d381ddfd9981eec8c075e4399b9dd02f1389e0ca6dbf6ee96fc83fc49b8/68747470733a2f2f706f7365722e707567782e6f72672f706564726f3135312f6f726d2d67656e657261746f722f762f756e737461626c65)](https://packagist.org/packages/pedro151/orm-generator)[![License](https://camo.githubusercontent.com/9fbfda32ba0e935a709fab50500b27feb356dc84581b49804fe7ec9f217a2bcc/68747470733a2f2f706f7365722e707567782e6f72672f706564726f3135312f6f726d2d67656e657261746f722f6c6963656e7365)](https://packagist.org/packages/pedro151/orm-generator)

ORM Generator maps the entire database and then creates the DAO (Data Access Object) and ORM (Object-relational mapping) of the entire database to facilitate the development.

uses various types of databases like Postgres and Mysql and various types of ORM framework.

Install
-------

[](#install)

install via `composer` or download the file `phar`.

\#####Install via `composer`:

```
$ composer require pedro151/orm-generator`
$ composer install`

```

\#####Download phar:

- [orm-generator.phar](https://github.com/pedro151/orm-generator/blob/master/bin/orm-generator.phar?raw=true)

Creating config file
--------------------

[](#creating-config-file)

use the following command to create the configuration file needed to get started:

```
$ php orm-generate.phar --init
```

OR

```
$ php generator.php --init
```

Configuration
-------------

[](#configuration)

setting is in `configs/config.ini` if you do not use frameworks adapter, if you use the adapter configuration comes straight from the framework as Zend framework and others.

PHP Code Generation
-------------------

[](#php-code-generation)

Open the prompt in the directory `orm-generator` and write:

```
$ php generate.php
```

Or Open the prompt in the directory `bin` and write:

```
$ php orm-generate.phar
```

Configurations optionals
------------------------

[](#configurations-optionals)

Commanddescription--initCreates the necessary configuration file to start using the ORM Generator.--name-inireference to another .ini file configuration (relative path).--config-envORM Generator configuration environment.--frameworkname framework used, which has the contents of the database configurations and framework template.--driverdatabase driver name (Ex.: pgsql, mysql).--databasedatabase name.--schemadatabase schema name (one or more than one).--tablestable name (parameter can be used more then once).--clean-trashdelete all files that do not belong to your Database due.--statusshow status of implementation carried out after completing the process.--versionshows the version of ORM Generator.--helphelp command explaining all the options and manner of use.--pathspecify where to create the files (default is current directory).--updateUpgrade to latest version.--downloaddownload the reported version (ex. --download=1.5.0).##### example:

[](#example)

in prompt

```
$ php generate.php --framework=zf1 --database=foo --driver=pgsql --status
```

Support Database
----------------

[](#support-database)

- Postgres
- Mysql
- Dblib
- Mssql
- Sqlserver

Framework Class Generator ORM
-----------------------------

[](#framework-class-generator-orm)

\- Classes Overwrite: Classes should not be personalized, they will be rewritten every generation of classes.

FrameworksConfig NameVersionGenerate ClassesClasses OverwriteZend Frameworkzf1.121.12DbTable, Entity, ModelDbTable, EntityPhalconphalcon3.0Entity, Model, PeerEntity

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~47 days

Total

15

Last Release

3264d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6169925?v=4)[Pedro Alarcão](/maintainers/pedro151)[@pedro151](https://github.com/pedro151)

---

Top Contributors

[![pedro151](https://avatars.githubusercontent.com/u/6169925?v=4)](https://github.com/pedro151 "pedro151 (475 commits)")

---

Tags

databasegeneratorormmysqlpostgresmssqlzendmodelentitymapperphalcondatamapperdaoorm-generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pedro151-orm-generator/health.svg)

```
[![Health](https://phpackages.com/badges/pedro151-orm-generator/health.svg)](https://phpackages.com/packages/pedro151-orm-generator)
```

###  Alternatives

[vlucas/spot2

Simple DataMapper built on top of Doctrine DBAL

604396.4k7](/packages/vlucas-spot2)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58825.9M54](/packages/scienta-doctrine-json-functions)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

846.1k](/packages/tommyknocker-pdo-database-class)[corneltek/lazyrecord

The Fast PHP ORM

103.6k2](/packages/corneltek-lazyrecord)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
