This will be supported in 3.2.2 and XDoclet-1.2b3.
There is an xdoclet tag called "@jboss.persistence dbindex="true"".
This adds to the CMP-field of the entity bean in jbosscmp-jdbc.xml.
A single field index which allows duplicate entries is created if the table is also created by jboss.
Thank you for your reply, that is exactly what I am looking for!
I tried the new dbindex XDoclet tag, and it works for CMP fields. However, does this work on a CMR relation field? (i.e., I want a DB index on a foreign key column too). I tried adding the @jboss.persistence dbindex="true" to the CMR field xdoclet tags, but it didn't seem to generate anything new.