Defining automatic joins
When I connect to a MS Access database with some defined relations, Active Query Builder creates automatic joins - this works fine.
But how can I define automatic joins in combination with a MySQL database?
Example: The primary key "id" of table "users" should be automatically joined with the field "user_id" of the table "emails" (1:n)...
Is it possible to pre-define these relations programmatically?
Thanks in advance!
Hello, Chris.
Please create new threads for new questions. This way you'll probably get answers faster.
You can add conditions to your queries programmatically in several ways. The first way is to modify the query by API right in the QueryBuilder. This way the user will see this change in the Visual Query Builder. This way is illustrated in the Query Modification demo project.
The second way is to use the QueryTransformer API. Changes made to the Query Transformer aren't shown to end-users, as the source query is not changed. Yo'll be able to get the changed SQL text via the QueryTransformer.SQL property. Read more about the Query Transformer in this article: How to change sorting, add filters, limits and aggregations to the query?