1.0.2 bugfix release of Cayenne is now available:
     http://objectstyle.org/cayenne/
It includes all the patches discussed on cayenne-user in the past 
weeks. I removed the intermediate patched versions from the 
objectstyle.org server. A few highlights from the release notes:
1. Fixes formatting of negative byte values by QueryLogger. Note that 
the final version is improved compared to the intermediate patches, 
using the algorithm similar to the one implemented in 
Integer.toHexString().
2. Implements a workaround for certain JDBC driver-level problems in 
handling java.lang.Short. Affected drivers are Oracle 9.1 driver for 
Mac OS X and Sybase jConnect
3. Support for binary PKs:
       - Fixes ObjectId.hashCode() and ObjectId.equals() to work with 
binary primary keys.
       - Implements a transparent client-side binary PK generator.
4. Fixes translating "parent qualifier" of SelectQuery (used in queries 
with derived entities).
5. Fixes SQL generated by Postgres and Firebird adapters for CREATE 
TABLE. Original problem was that binary types ("bytea" on Postgres and 
"blob sub_type 0" on Firebird) were assigned max. length, that is not 
supported on the target database.
A few words on binary PKs. If a primary key column in the database is 
BINARY or VARBINARY, Cayenne will automatically generate a byte[] value 
when an object is inserted to the database. The size of the byte[] will 
be equal to the max. length specified in the mapping for the column. 
Generated byte[] is a pseudo-GUID (globally unique id). It is "pseudo" 
since Java does not provide facilities to create a real GUID (there are 
some native libraries that do that if anyone cares; I believe Holger 
posted a link on cayenne-devel some time back). Also I would not rush 
switching all your existing entities to use a binary key. Whatever 
little time it saves during PK generation by not going to the database 
(not much really, considering how Cayenne caches PK sequences), will be 
too small compared to the inefficiency during subsequent selects (and 
of course it'll take more disk space in the DB). But of course some 
have to deal with existing systems implemented using binary PKs. This 
is where such feature is useful.
Enjoy!
Andrus
This archive was generated by hypermail 2.0.0 : Mon Oct 27 2003 - 17:22:53 EST