Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, thanks a lot for providing such a nice structured interface to MySQL web apps. It helped me a lot!
This PR is a suggestion to fix #97.
first commit
Dependency definitions did not get observed. With original call to
loadTable
the parameters asked for all tables. The returned object is of type Dataface_DB. Then, condition in line 677 fails. Approach, remove extra parameters, and rely on defaults (no DB defined, single table). With this change, dependencies of a View (as defined in fields.ini) are now observed.second commit
Tables that have grafted fields using a
__sql__
do not get their dependencies attributed. Those tables get a dynamic view nameddataface__view__<md5 Sum>
. Problem is that the reg ex in line 673 of Dataface/DB.php requires a view in the naming convention ofdataface__view__<tableName>_<md5 Sum>
. This is needed in order to identify the table name, and subsequently to look up the attributes of the table to determine user listed dependencies.The second commit changes the view name. The change should be transparent, as just new views are created. Old views are deleted on the next clear views (which operates on
dataface__view__%
)One disadvantage of this approach is that column length is limited to 64 characters. Given the current naming conventions, the constant part is already 48 characters long. Leaving only 16 characters for user tables names.