-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
@mickadoo can you please rebase this to fix merge conflicts? |
…sed repeatedly)
@colemanw rebased onto master Just a reminder, but if you want to run tests on this you make a change in the core code which has the API4 namespace hardcoded in
Do you think I should submit a core patch for this, it's not urgent for me, but will be annoying for anyone who wants to demo APIv4. I wonder if this should be configurable, or if there's a different approach for how we'll do this. |
Yes go ahead and submit a core PR for that change.
…On 07/07/2017 07:02 PM, Michael Devery wrote:
@colemanw <https://github.com/colemanw> rebased onto master
Just a reminder, but if you want to run tests on this you make a
change in the core code which has the API4 namespace hardcoded in
|\Civi\API\Request|. Here's what I have:
|$callable = array("Civi\\API\\V4\\Entity\\$entity", $action); //
$callable = array("Civi\\Api4\\$entity", $action); |
Do you think I should submit a core patch for this, it's not urgent
for me, but will be annoying for anyone who wants to demo APIv4. I
wonder if this should be configurable, or if there's a different
approach for how we'll do this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
mute the thread
<https://github.com/notifications/unsubscribe-auth/ACveIB6mnFh1GB1gDUnTE0av88sUMhAlks5sLrjugaJpZM4OQMDq>.
|
@mickadoo it looks like you're placing api4 entities in the |
@colemanw The namespace is
Which replaced
|
This PR contains changes currently under review in #66
Overview
This PR focuses on allowing automatic joins to other tables using dot notation syntax in the select query, for example
Contact::get()->addSelect('emails.email')
It also does a lot of moving files about, so there are a lot of files changed.
Before
APIv4 did not allow joining on any other tables
After
A schema map builds links to tables that can be joined and automatically joins them if used in the query
Notes
SchemaMap
class contains a collection of all tables in the database. Each table has n links to other tables. These links areJoinable
instances, which can be used by theJoiner
class to join tables.SchemaMap
is built using a factory service, this service uses both calls to core code (to fetch the base tables), an event system, and calls to get the custom value tables to build a picture of the schema with the links between tablesCivi\API\V4
). Because of the namespace change I've had to temporarily modify\Civi\API\Request
in the core code. The new namespace should be used here:$callable = array("Civi\\API\\V4\\Entity\\$entity", $action);
Civi\Test
. This separates the test namespace from production