I have an application that needs only one record from a related table for each result in the main table. Is it possible to apply order and limit clauses to a leftJoin? If not, is there some other way to handle that?
So to clarify - does your data actually have a one-to-many structure, but you just want to pick the first from the "many"? That isn't something that the left join will do I'm afraid. You'd need to use an Mjoin and a suitable renderer to display just the first item.
Yes, this relationship is one-to-many. (I'm just trying to display the most recent of a potential list of things.) I hadn't realized that Mjoin with a renderer would be the way to attack this. I'll give that a shot.
Answers
So to clarify - does your data actually have a one-to-many structure, but you just want to pick the first from the "many"? That isn't something that the left join will do I'm afraid. You'd need to use an Mjoin and a suitable renderer to display just the first item.
Allan
Allan,
Yes, this relationship is one-to-many. (I'm just trying to display the most recent of a potential list of things.) I hadn't realized that Mjoin with a renderer would be the way to attack this. I'll give that a shot.
Thanks for the suggestion,
Tom