Hi, First, I am forced to use a legacy database. My problem is that I need data from two separate tables which I can get easily enough separately. What I do need to know is how to join that information together so I can send the result as one xml result.
I.e. from one query I get (after render to xml) <components type="array"> <component> <componentid type="integer">1</componentid> ... <name>Blah</name> </component> <component> ... </component> </components>
And want to add an item <version>some version string</version> which is data from a 'version' table into that above result
so the result would look sorta like <components type="array"> <component> <componentid type="integer">1</componentid> ... <name>Blah</name> <version>1.2.3.4</version> </component> <component> ... </component> </components>
Now I can't really use association since it's a legacy database and the 'id' in the 'component' table in MySQL does not correspond to a 'version_id' column in the 'version' table as there is no 'version_id'.
Is my only choice using XML Builder? Or can I manipulate the object retrieved from the database find queries and send it straight to render xml?
Or am I missing something really simple?