2017 © Pedro Peláez
 

library database-entities-builder

Generates simple database entities from doctrine mysql schema

image

shyim/database-entities-builder

Generates simple database entities from doctrine mysql schema

  • Sunday, March 25, 2018
  • by shyim
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Database Entities Generator

Build Status, (*1)

This package generates simple entities, repository and service from a mysql database schema., (*2)

Pro

  • Lower overhead, its using dbal in background
  • No magic, just the generated classes

Contra

  • Its too simple, so it can't resolve associations or so
  • No validation

Example Usage

Example Generated Code: https://gist.github.com/shyim/edc17de35a5896c2a47c8a9eb90541bd, (*3)

Retrive a entity, (*4)

$cmsEntity = $cmsRepositoy->find($cmsId);
$cmsEntity = $cmsRepositoy->findOneBy(['name' => 'imprint']);
$cmsEntity = $cmsRepositoy->findBy(['status' => 1]);

Create a new entity, (*5)

$cmsEntity = new Cms();
$cmsEntity->setName("lol");
$cmsEntity->setStatus(1);

$cmsEntity = $cmsRepository->create($cmsEntity);

var_dump($cmsEntity->getId());

Update a entity, (*6)

$cmsEntity->setName("Lol");
$cmsEntity = $cmsRepository->update($cmsEntity);

Delete a entity, (*7)

$cmsRepository->remove($cmsEntity);

Integrations

The Versions

25/03 2018

dev-master

9999999-dev https://github.com/shyim/DatabaseEntitiesBuilder

Generates simple database entities from doctrine mysql schema

  Sources   Download

MIT

The Requires

 

The Development Requires

database models doctrine simple-orm

25/03 2018

0.1.1

0.1.1.0 https://github.com/shyim/DatabaseEntitiesBuilder

Generates simple database entities from doctrine mysql schema

  Sources   Download

MIT

The Requires

 

The Development Requires

database models doctrine simple-orm

20/03 2018

0.1

0.1.0.0 https://github.com/shyim/DatabaseEntitiesBuilder

Generates simple database entities from doctrine mysql schema

  Sources   Download

MIT

The Requires

 

database models doctrine simple-orm