Hi Niels,
Thanks for your patience.
I have a relational-service mapping layer which acts on multiple
tables within a transaction - a very common pattern - but the insert()
did not appear to return the autogenerated id within the transaction
scope. It worked OK when I removed the startTransaction statement but
failed with it in place. However I have refactored my code and it is
now working as expected - unfortunately I do not know why it was not
working before - but was obviously not related to iBATIS (btw I never
thought it was!). What I meant by the DTD being correct is that I
checked that I am using a version that includes the selectKey stanza.
Many thanks, Chris.