And the relation between ‘Products’ and ‘ProductDetails’ is that a product can have many details, since these could be described in a vary of languages. So a product HAS_MANY product details. In the database table the product details has a foreign key to a product, so thats a one to one relationship.
So the query above gives me all the products BUT it only gives me the first hit on the productDetails.
When iterating thru all the products with $product as the product record, this code gives me the same result each time:
echo $product -> productDetails[0] -> title;
But what I want is of course the corresponding productDetails for each product…