You might want to try...
<sql-type>INTEGER auto_increment PRIMARY KEY</sql-type>
This seems to work, although I have some other issues with entity beans at the moment.
Actually, this probably won't work at all. The primary key needs to be set during ejbCreate, but you don't have access to the generated value. Moreover, the entity bean doesn't seem to be able to "pick up" the generated value by itself. Therefore, you can't even provide a fake value and hope that it gets changed later.
What we really need is "unknown primary keys", I think.
There is no way at all to do this now. Dain is working on a generic key generator for the cmp2. I am considering how to make it possible to use stored procedures for db access in cmp, which would provide an indirect solution (I think). (write a sp to do the insert, returning the id). My part is in the fairly distant future.
So far, all of the material I've found on unknown primary keys just restates the specification (isn't that always the case with EJB?), but the specification also seems to suggest that adding extra abstract methods, cmp-fields and possibly a constructor (where the primary key is set) is the way to go.
That is, you add a constructor to the entity bean implementation and use some kind of generator there to set the primary key field. Should this work? (I can't seem to make it work yet.)