I'm using CMP 2.0 having 2 EJBs related with one PK thought CMR. Under "jbosscmp-jdbc.xml" I have specified indexing with "dbindex" in main bean as PK but in the related bean FK column is NOT created with indexing. I need that to be indexed as well, I know I can manually alter the table but its more convinient if the EJB deployer does it for me when tables are created. Is this a bug or there is some workaround?
Thanks in advance!
The indexes are only created when automatically creating or updating tables, so for an existing database alter-table needs to be true.
However, this will remove fields/links which are not referenced by your beans (if the db is not exclusively owned by your JBoss application).