Simple reflection can sort that, something along the lines of (without having the exact method names to hand) :You can get field names by doing: Torque.getDatabaseMap().getTable(XxxPeer.TABLE_NAME);<snip/>..if you just have Xxx, you can do Xxx.getPeer().TABLE_NAME.I just have Xxx, which in my case, is of type BaseObject. Unfortunately, BaseObject doesn't define a stub for getPeer, so my code won't even complile. Note that I use BaseObject because I need my code to be generic and can't be coding for a particular database table.
Method getPeer = Xxx.getClass().getMethod("getPeer", new Class[0]);
Object peer = getPeer.invoke(Xxx);
Field tableNameField = peer.getClass().getField("TABLE_NAME");
Object tableName = tableNameField.getValue();
However, I believe I'm right in thinking that the DatabaseMap does not concern itself with the method names on the data objects - so although you can find all the column names for a table, you still can't find their values on an arbitrary object in order to turn it to XML. I could be wrong... but if I'm not, something new still has to go into the generated code.
G.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
