2017 © Pedro Peláez
 

library zf-doctrine-orm-data-validation

Validate foreign key relationships in data

image

api-skeletons/zf-doctrine-orm-data-validation

Validate foreign key relationships in data

  • Tuesday, April 3, 2018
  • by tom_anderson
  • Repository
  • 1 Watchers
  • 2 Stars
  • 742 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Doctrine ORM Data Validation

Gitter Total Downloads, (*1)

For one reason or another you will build an ORM on top of an existing database. The existing database may not have referential integrity for all it's relationships., (*2)

You now have a database with an ORM and there is probably bad data in the database which does not conform to the relationships defined in the ORM., (*3)

This tool is intended for devleopment only., (*4)

Foreign Key Validation

Create a report by scanning every relationship defined in your ORM for data which is missing it's foreign key. Nullable relationships are not evaluated., (*5)

php index.php orm:data-validation:relationship --object-manager="doctrine.entitymanager.orm_default"

This will output TSV with the Count, Distinct Values, Child Field, Child Entity, Parent Entity, and the SQL to duplicate the results for all relationships where data is found in the child which references data not found in the parent., (*6)

Configure Zend Framework 2 Module

composer require "api-skeletons/zf-doctrine-orm-data-validation": "^1.0"

Add to config/development.config.php.dist:, (*7)

return array(
    'modules' => array(
        'ZF\\Doctrine\\ORM\\DataValidation'
        ...
    ),

Enable development mode to copy development.config.php.dist to development.config.php, (*8)

The Versions

03/04 2018

dev-master

9999999-dev

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson

02/04 2016

1.0.2

1.0.2.0

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson

01/04 2016

1.0.1

1.0.1.0

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson

01/04 2016

1.0.0

1.0.0.0

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson

01/04 2016

0.0.2

0.0.2.0

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson

01/04 2016

0.0.1

0.0.1.0

Validate foreign key relationships in data

  Sources   Download

The Requires

 

The Development Requires

by Tom H Anderson