You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Mike Vallender <mi...@uk.ibm.com> on 2010/05/26 13:08:00 UTC

Index annotations mixed with ORM mapping files

Hello, 

We've got an openJPA application where we initially defined all the 
OpenJPA metadata as annotations in the persistent java class files. Some 
of the persistent class files had openJPA specific annotations for indexes 
- such as 

org.apache.openjpa.persistence.jdbc.ElementIndex 
org.apache.openjpa.persistence.jdbc.Index. 

We then has an issue which meant that instead of using annotations in the 
persistent java classes we also created XML mapping-files to contain the 
metadata information. However - there's nothing in the ORM.xsd for the 
openJPA specific index annotations - so they are still only defined in the 
persistent java classes. 

I was under the impression that metadata information in the mapping files 
was merged or overrided the mapping metadata information in the persistent 
java classes - however indexes are no longer created. So the index 
annotations dont seem to be merged in? IS this right? Is there some way to 
get around this?

Mike 






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU