>> how can i replicate this, Doug?
>I was just running FooBarTest with Mckoi.
OK, I will try + get McKoi runnning. I can't replicate the problem on any
other db, and I don't think the recent changes to support native key
generation would affect _deletions_ at all. So I'm at a loss.
May or may
>>> The native key generation rearranges the insertion order of objects and was
>>> causing foreign key constraint violations. I have made a quick (easy) fix,
>>> though something more efficient might be better in future. (Nothing changed
>>> for non-native key generation.)
>> I'm not so sure...
> Mckoi has a function UNIQUEKEY which generates a uniqueid, but it
> doesn't seem to fit the model employed by Hibernate...
> SELECT UNIQUEKEY('Orders')
DB2 also has something like this. I think its easy enough to write an
IDGenerator to take advantage of this style of key generator (ditto
> I think thats database dependent, mysql will sometimes reuse id values,
> mssql and sybase dont.
Yeah, I checked up on DB2 and *it* doesn't. Its not such a problem if
ids are reused, but there is a possibility of hibernate throwing an
exception.
___
That all looks really good, chris.
(There was one tiny problem where the insert string was wrong for a table
with no other columns but thats a far-from-typical case.)
I have a question:
If, in a single transaction, I delete a row of a table and then insert a
new row, is it likely that the inse
Ok, I have now checked in the database native keygeneration. It should
work for MySQL and mssql/sybase.
To use it just use
I hope all works ok.
regards
chris
Gavin_King/[EMAIL PROTECTED] wrote:
ok, then its not possible. I will add a check that the native
idgenerator is not used for a co