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 2017-03-30 19:51 UTC

README

Travis build status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

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 via composer or download the file phar.

#####Install via composer:

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

#####Download phar:

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

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

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

example:

in prompt

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

Support Database

  • Postgres
  • Mysql
  • Dblib
  • Mssql
  • Sqlserver

Framework Class Generator ORM

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