Test Tripal DBX Table Prefixing + Add support for Inheritance #290
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.
This PR tests Tripal DBX table prefixing and was undertaken to address Issue #217.
It turns out that Tripal DBX table prefixing is not actually broken and this is more a misunderstanding and incorrect usage. As such, I have documented how Tripal DBX determines the table prefix to apply in Tripal Doc Issue 9.
To summarize, if the schema to use is not indicated (i.e. if you use
{tablename}
rather then{1:tablename}
) then Tripal DBX automatically assumes you want the Drupal database. This is needed since Drupal seems to unknowingly use Tripal DBX sometimes (why needs more exploration). In order to allow queries using{chadotable}
you need to add the class executing these queries to a Tripal DBX managed whitelist. This is done as follows:NOTE: I'm still confirming but it is likely this whitelist is specific to the current connection instance.
Additionally, I added automated testing to confirm this functionality and to ensure it continues to work.
I also added functionality to check through the inheritance chain to allow us to specify parent classes and added additional in class documentation to the TripalDbxConnection class.