Just curious about the specific here. In the past, the server specific JDBC driver would convert from a server specific field into a java.sql.Type type. So the MySQL JDBC DateTime and Timestamp fields would both be mapped to java.sql.Type.TIMESTAMP. This info is available via the MetaData and that is what Village/Torque used to define types needed when populating Torque record objects.
So is this needed because Torque 4 doesn't do something similar? If this is the case, I'm not sure that just letting people manually map to a column type is the solution. This automatic mapping of server specific to standard types via JDBC made it simple for Torque to interface with "3rd party schemas". E.g., if they used Timestamp or DateTime, just define the XML column as TIMESTAMP and it worked... regardless of if you were using the 3rd party schema defined for MYSQL or MSSQL or ORACLE. I'm thinking that the issue is deeper than just "let the programmer patch it for the specific DB". If we do this we lose the ability to write Torque code once and run against many DBs when you're "adding on" to 3rd party schemas. Or, I could totally be misunderstanding something here... :) -----Original Message----- From: Thomas Fox [mailto:[email protected]] Sent: Wednesday, May 02, 2012 9:02 AM To: Apache Torque Developers List Subject: custom sql types in Torque 4 Currently, it is not possible in Torque 4 to use a sql type which is not mapped by a Torque type. E.G the torque type TIMESTAMP is mapped to the SQL type DATETIME in mysql, and it is not possible to create a column with SQL type TIMESTAMP out of the box. Therefore I propose to add an attribute "sqlType" to the column Element in whihc the default sql type can be overridden. Any objections ? Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] DukeCE Privacy Statement: Please be advised that this e-mail and any files transmitted with it are confidential communication or may otherwise be privileged or confidential and are intended solely for the individual or entity to whom they are addressed. If you are not the intended recipient you may not rely on the contents of this email or any attachments, and we ask that you please not read, copy or retransmit this communication, but reply to the sender and destroy the email, its contents, and all copies thereof immediately. Any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
