Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[#177] Ensure DB-Connected configuration is properly updated #178

Merged
merged 1 commit into from May 22, 2014

Conversation

Projects
None yet
1 participant
Owner

weierophinney commented May 22, 2014

The Admin UI sends the entire DB-Connected resource across in every request.
This raises an issue, because the resource_class is always sent as a null
value (as we do not want to reference "virtual" resource classes for purposes
of the source code view modal). Because this is null, we end up updating a
null value.

We can get the resource_class when fetching the original service data by
passing a boolean false to the $isAFetchOperation flag; this forces the
DB-Connected onFetch() listener to include it when returning the entity.
However... we were not passing that flag when doing updateService()
operations, which meant that updating a DB-Connected service always wrote the
DB-Connected configuration under a blank key.

This patch does two things:

  • It now passes the $isAFetchOperation flag for update operations.
  • It now pulls the resource_class from the updated REST entity prior to
    performing db-connected-specific update oparations.
@weierophinney weierophinney [#177] Ensure DB-Connected configuration is properly updated
The Admin UI sends the entire DB-Connected resource across in every request.
This raises an issue, because the `resource_class` is always sent as a `null`
value (as we do not want to reference "virtual" resource classes for purposes of
the source code view modal). Because this is `null`, we end up updating a null
value.

We can get the `resource_class` when fetching the original service data by
passing a boolean `false` to the `$isAFetchOperation` flag; this forces the
DB-Connected `onFetch()` listener to include it when returning the entity.
However... we were not passing that flag when doing `updateService()`
operations, which meant that updating a DB-Connected service always wrote the
DB-Connected configuration under a blank key.

This patch does two things:

- It now passes the `$isAFetchOperation` flag for update operations.
- It now pulls the `resource_class` from the updated REST entity prior to
  performing db-connected-specific update oparations.
6d1cdab
Owner

weierophinney commented May 22, 2014

Fixes #177

@weierophinney weierophinney merged commit 6d1cdab into zfcampus:master May 22, 2014

1 check was pending

continuous-integration/travis-ci The Travis CI build is in progress
Details

@weierophinney weierophinney added a commit that referenced this pull request May 22, 2014

@weierophinney weierophinney Merge branch 'hotfix/177'
Close #178
Fixes #177
75f7f28

@weierophinney weierophinney added a commit that referenced this pull request May 22, 2014

@weierophinney weierophinney Merge branch 'hotfix/177' into develop
Forward port #178
82031b7

@weierophinney weierophinney deleted the weierophinney:hotfix/177 branch May 22, 2014

@weierophinney weierophinney added this to the 1.0.2 milestone May 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment