Arrghh.. I'm afraid my reserved word nightmare continues ...
I have a table called Contact which has a column named Primary - ooh lovely i hear you all say :)
I used backticks around the column name and aliased the column to "isPrimary" to get transfer working.
         <object name="Contact" table="customer_contacts">
            <id name="ID" type="numeric" />
            <property name="isPrimary" type="numeric" column="`Primary`" />
            ....
         </object>
However if i try to retrieve an object for which i know Primary = 1, it is always zero. Also if i place backticks around another column name, one which is NOT a reserved word that property will be returned as zero / empty string so something inside transfer is "loosing" the value.
I'm very new to transfer so this has been a little voyage into the depths, and i might be way off but here's what i've found.
transfer.com.sql.SQLValue.getPropertyColumnValue() uses the column name returned by com.transfer.object.Property.getColumn() to retrieve the value from the query object - as this will always be wrapped in back ticks it returns null, and getPropertyColumnValue() then assumes the value should be null and substitutes an empty string or zero accordingly
Property.getColumn() would need to return the column name with back ticks for queries to work correctly (i'm assuming), so for now i've chucked a hack in SQLValue.getPropertyColumnValue() to remove the back ticks before calling query.getString(). But i'm sure theres probably a better way to handle this?
going slightly off-topic, would it not be possible for transfer to escape the table and column names as it creates the SQL. I see theres already dbms specific SQL factories could they not have methods for wrapping column names in escape characters? If that were the case then this issue would go away entirely, and having to enter table/column names in the xml wrapped in escape characters which is ugly would be unnecessary. Sorry if this is controversial and/or been covered before