Drukowana wersja tematu

Kliknij tu, aby zobaczyć temat w orginalnym formacie

Forum PHP.pl _ Oceny _ Doctrine orm reverse engineering wrapper

Napisany przez: mcmaroon 20.11.2017, 23:34:21

Witam serdecznie,
popełniłem nakładkę na
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#reverse-engineering
A tu link do github
https://github.com/mcmaroon/doctrine-orm-convert-mapping
Czemu ? Ponieważ

Cytat
Reverse Engineering is a one-time process that can get you started with a project. Converting an existing database schema into mapping files only detects about 70-80% of the necessary mapping information. Additionally the detection from an existing database cannot detect inverse associations, inheritance types, entities with foreign keys as primary keys and many of the semantical operations on associations such as cascade.


Co w praktyce oznacza że gdy chcę zmapować do encji bazę niezwiązaną z orm to dostanę same Exceptions związane z enumami, brakiem np primary key itd a ja chciałem żeby skrypt wyrzucił to co potrafi i tyle.
Mapowanie bazy do encji
Kod
php run.php app:convert-mapping --help

Opcjonalna komenda to wersjonowania struktury bazy na podstawie encji
Kod
php run.php app:schema --help


Pisane na potrzeby własne ale może komuś się spodoba.
Pozdrawiam

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)