So OQL is new to me !!! Firstly I've designed my domain as though it where RDBMS with columns joining tables, which I guess are now redundant? Secondly, to create reports I presuem that I need to build an appropraite dataset using OQL? IF so How do I reference data from multiple tables without using something like 'select a.col2, b.col2 from a, b where a.indx = b.indx!!! so a traditional sql join statement. Thanks in advance for your help! Regards Nick Ford
You're correct, in Mendix you don't use columns to join tables, but you use associations to connect entities. Take for example the following domain model:
A simple OQL query that shows all customers with their jobs would look something like this:
SELECT customer/FullName AS CustomerName,
profile/Job AS Job
FROM MyModule.Customer AS customer
INNER JOIN customer/MyModule.Customer_Profile/MyModule.Profile AS profile
See also the Mendix documentation on OQL and the Domain Model for more information.