The Torque team is pleased to announce the Torque 3.3-RC1 release! http://db.apache.org/torque/
What is Torque? Torque is an object-relational mapper for java. In other words, Torque lets you access and manipulate data in a relational database using java objects. Unlike most other object-relational mappers, Torque does not use reflection to access user-provided classes, but it generates the necessary classes (including the Data Objects) from an XML schema describing the database layout. Changes in this version include: New Features: o The Column names TABLE_NAME and DATABASE_NAME are now legal column names. Issue: TORQUE-44. Thanks to Greg Monroe. o Added a maven 2 plugin. Issue: TORQUE-2. Thanks to Raphael Pieroni. o Added support for option tags for most elements in the database.xml for usage with custom templates. Issue: TORQUE-27. Thanks to Greg Monroe. o Added support for customizing generator templates. Issue: TORQUE-50. Thanks to Greg Monroe. o Add a "serialVersionUID" to the generated classes that implement Serializable. The entry is generated if "addTimeStamp" is true. This should remove quite a number of warnings when using Torque generated classes. o Provided support for user-loadable DB adapters. o Refined guesswork for detecting column names out of functions, clauses etc. This is important e.g. for orderBy Statements like "order by table.column in (1,2,3)" or "order by 100 &< table.column". Issue: TORQUE-33. Thanks to Jacob Champlin. o Added the CASCADE option to drop table statements for HSQLDB. This will not work with HSQLDB 1.7. Consult the HSQLDB Howto for information about reverting to the old behaviour. Issue: TORQUE-30. Thanks to Patrick Carl. o Added setByName and setByPosition methods in the generated object classes that match the already existing getByName and getByPosition methods. Issue: TORQUE-26. Thanks to Greg Monroe. o A database map can now load all contained tableMaps using its method databaseMap.initialize(). Issue: TORQUE-22. Thanks to Greg Monroe. o The database maps now provide all information from the schema.xml. Issue: TORQUE-22. Thanks to Greg Monroe. o Improved performance for sybase limit using SET ROWCOUNT. Issue: TORQUE-25. Thanks to Martin Goulet. o Added methods for shallow copies into the generated objects. Issue: TORQUE-23. Thanks to Thoralf Rickert. o Added createdb-template for MS-SQL. Issue: TORQUE-18. Thanks to Greg Monroe. o Added a new convenience method, Transaction.begin(), which is the same as Transaction.begin(Torque.getDefaultDb()). o Added the table descriptions from the schema.xml to the comments of the generated classes. Thanks to Thoralf Rickert for the patch. o Added Java5 generics support for the generated classes. Thanks to Thoralf Rickert for the patch. o Formatting of the html documentation generated by the generator is now done by css stylesheets. o Subqueries are now supported. This has caused Criterion.appendTo(StringBuffer) to declare throwing a Torque Exception. Issue: TRQS305. o Extended support for derby. IdMethod native is now supported Added mappings for Torque types LONGVARCHAR, BINARY and VARBINARY Implemented the methods getMaxColumnNameLength(), hasScale() and hasSize() in PlatformDerbyImpl Foreign keys are now declared outside the CREATE TABLE statement, allowing to create foreign references independent of the order of tables in the schema.xml The SQL for the creation of Indices is now generated correctly (a CRLF was missing at the end) Thanks to Johnny Macchione for the patches. Fixed bugs: o Fixed a synchronisation issue in the getDateString() method in the database adapter for postgresql. o Wrong caching of method calls with more than three arguments in MethodResultCache. Issue: TORQUE-63. Thanks to Ronny Völker. o Fixed handling of escaping (by backslashes) for LIKE clauses. This included fixing the general handling of backslashes for several databases. Issue: TORQUE-57. o Booleanchar and Booleanint now work for chained (and'ed, or'ed) Criterions. Issue: TORQUE-59. o Limit and Offset work now correctly if applied to joined tables which contain the same column name in oracle. Issue: TORQUE-10. o The variable CLASS_NAME in the map builders is now filled correctly if the build property torque.subpackage.map is set. Issue: TORQUE-56. Thanks to Gustavo Fernandez. o Use encoding in the header of schema.xml files instead of default encoding to parse the schema.xml files. Issue: TORQUE-49. o Selects for BOOLEANCHAR and BOOLEANINT now work for aliased tablenames and joined tables. o Preserved case when generating the constants for column names in the Peers and the database maps. For example, for a table named book and a column namend author_id, the constant BaseBookPeer.AUTHOR_ID is now set to book.author_id, whereas in former versions, this constant would have been set to book.AUTHOR_ID. The old behaviour can be regained by setting the generator property torque.deprecated.uppercasePeer to true. Issue: TORQUE-44. Thanks to Thoralf Rickert and Greg Monroe. o Fixed MS-SQL failure in LargeSelect. Issue: TORQUE-20. Thanks to Greg Monroe. o Fixed several methods not using JavaName in Peer.vm. Thanks to Thoralf Rickert for the patch. Issue: TORQUE-43. Thanks to Thoralf Rickert. o Fixed Criteria.andDate() methods to call getTime() like the addDate methods do. Added a test case to check this. Thanks to Federico Fissore for the Criteria patch. Issue: TORQUE-42. Thanks to Federico Fissore. o Caught SQL exception when foreign keys for a table or view cannot be retrieved in the jdbc ant task in the generator. Now a warning is printed instead of stopping execution. Issue: TORQUE-41. Thanks to Thoralf Rickert. o Fixed wrong constant CLASS_DEFAULT_NAME in generated peer classes. The error occurred only if the option torque.subpackage.object was set in the generator properties. Issue: TORQUE-28. Thanks to Mojmir Hanes. o Fixed foreign key constraint generation for Firebird. Issue: TORQUE-6. Thanks to Joerg Friedrich. o Corrected datatype Mapping for MS-SQL: Torque type BLOB is now mapped to MS-SQL type IMAGE (was BLOB in Torque 3.2, not working) Torque type CLOB is now mapped to MS-SQL type TEXT (was CLOB in Torque 3.2, not working) Issue: TORQUE-19. Thanks to Greg Monroe. o Fixed bug in bean generation when a table has several references to another table. Issue: TORQUE-21. Thanks to Nicolas Le Griel. o Added new firebird database adapter. Date Strings returned by the interbase and firebird adapters are now escaped. Issue: TORQUE-4. Thanks to Joerg Friedrich. o Corrected datatype Mappings for firebird: Torque type char is now mapped to firebird type char (was varchar) Torque type double is now mapped to firebird type double precision (was double) Torque type booleanchar is now mapped to firebird type char(1) (was varchar(1)) Issue: TORQUE-4. Thanks to Joerg Friedrich. o Corrected Mapping for Type LONGVARCHAR for Derby. Issue: TRQS356. o Added dummy template for DB creation for DB2. Issue: TRQS362. o Mapped the Torque type INTEGER to the SQL type INTEGER in Mysql. (In Torque 3.2, this was changed unintentionally to MEDIUMINT. MEDIUMINT does not cover the full data range of java integers.) Thanks to Joerg Friedrich for reporting the error. Issue: TORQUE-5. o Use BigDecimal(double) constructor so as to help code compiled under JDK 1.5 execute correctly under earlier JDKs ( Related Eclipse bug). o HSQL's autoincrement columns now start with one instead of zero. Thanks to Patrick Carl for an early version of the patch. Issue: TRQS335. o IgnoreCase in PsSelects now also takes into account Criterion's setIgnoreCase(). Thanks to Robert Dietrick for an early version of the patch. Issue: TRQS345. o Changed behaviour for a limit of zero: (criteria.setLimit(0)) If the db supports native limit, a limit of zero returns zero datasets. if the db does not support native limit, a limit of zero causes a TorqueException (thanks to village :-() The former behaviour was: A limit of zero returns all datasets. o Fixed case-insensitive order by for hsqldb. o BaseObject.equals() does not return true anymore if the objects do not have the same class. Thanks to Patrick Carl for the patch. Issue: TRQS133. o Fixed foreign key support in mysql to allow the referenced table to be declared before the referencing table. This is done by defining the foreign keys in an extra "CREATE TABLE" statement instead of defining them in the "CREATE TABLE" statement. Note that foreign keys are ignored by mysql except in InnoDB tables. Thanks to Thoralf Rickert for suggesting the patch. Fixes also TRQS278. Changes: o Provided generic typed wrappers for methods in BasePeer when torque.enableJava5Features is set to true. Issue: TORQUE-31. Thanks to Thoralf Rickert. o The default package for generated classes was changed from org.apache.torque to torque.generated. Issue: TORQUE-37. Thanks to Greg Monroe. o Simplified the Torque Avalon component. o Made DB an interface and changed all database adapters to extend AbstractDBAdapter. Moved generateLimits methods to the adapters and deprecated getLimitStyle and associated constants because this should be handled transparently for the user. o Centralized the information the runtime keeps about underlying databases in a singe class called Database. Deprecated the decentralized methods to access information about the databases. o The IdBroker is now only started for a database if the IdMethod idBroker is used in that database. o Update to the Avalon components of Torque. The component now understands Merlin- and YAAFI-type context entries and provides again all methods from TorqueInstance. o If no DTD is given, in the schema.xml, no dtd is used to validate the schema.xml. The old behaviour was to use the dtd from the generator jar. The vote for this release can be found in http://mail-archives.apache.org/mod_mbox/db-torque-dev/200611.mbox/[EMAIL PROTECTED] Have fun! -The Torque team --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]