Go to file
Soner Sayakci 8aeec9b01a
Bugfixes
2018-03-20 20:31:52 +01:00
src Bugfixes 2018-03-20 20:31:52 +01:00
composer.json LOL 2018-03-20 19:30:33 +01:00
README.md Bugfixes 2018-03-20 20:12:49 +01:00

Database Struct Generator

This package generates simple structs, repository and service from a mysql database schema.

Pro

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

Contra

  • Its too simple, so it can't resolve dependencies or so

Example Usage

Retrive a entity

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

Create a new entity

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

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

var_dump($cmsEntity->getId());

Update a entity

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

Delete a entity

$cmsRepository->remove($cmsEntity);