Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Hotfix #376: Accessing constraint metadata within the Oracle adapter #399

Merged

Conversation

panychek
Copy link
Contributor

@panychek panychek commented Dec 8, 2019

Fixes #376

The OracleMetadata::loadConstraintData method simply does not work:

$metadata = \Zend\Db\Metadata\Source\Factory::createSourceFromAdapter($adapter);
$constraints = $metadata->getConstraints($table, $schema); // always an empty array

The existing test couldn't catch it because there is no real table involved:

$constraints = $this->metadata->getConstraints(null, 'main');
self::assertCount(0, $constraints);

@michalbundyra
Copy link
Member

@panychek Thanks for your contribution. We need unit test for that change.

@panychek
Copy link
Contributor Author

panychek commented Dec 8, 2019

I modified the existing one, so please have a look.
BTW, there are no tests for this behavior in either of the adapters.

@michalbundyra michalbundyra added this to the 2.10.1 milestone Dec 31, 2019
@michalbundyra michalbundyra merged commit c3aa305 into zendframework:master Dec 31, 2019
michalbundyra added a commit that referenced this pull request Dec 31, 2019
Hotfix #376: Accessing constraint metadata within the Oracle adapter
michalbundyra added a commit that referenced this pull request Dec 31, 2019
michalbundyra added a commit that referenced this pull request Dec 31, 2019
michalbundyra added a commit that referenced this pull request Dec 31, 2019
@michalbundyra
Copy link
Member

Thanks, @panychek!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Oracle stuff
2 participants