db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Carl <patrick.c...@web.de>
Subject Torque with hsqldb and referenced identity columns
Date Thu, 17 Nov 2005 22:02:32 GMT
Hello there,

when using Torque with hsqldb adn native id generation Torque uses the 
column constraint "IDENTITY" of hsqldb. This creates by default primary 
key ids starting with 0. This can lead to false behaviour in the 
following conditions:
It is possible that an object A with id 0 is created. If this object is 
refered by an related object B, the method B.getA does not work, since 
B.getA checks if B.aId != 0.

To prevent this I created the attached patches. Using them will set the 
starting id of an identity column to 1.

Please note that I wasn't abled to get the test project to work, so I 
couldn't test this patch as much as I would. Perhaps someone else can do 


View raw message