First Problem:
JpaContainer does not play well with OpenJPA’s build time enhanced entities. The MetadataFactory uses reflection to detect propertyIDs etc, and in the process it also detects all the properties that was added as part of the build time enhancement. Then when it comes to rendering fields in the forms it causes Runtime exceptions.
Question
Is there a reason why you chose to use reflection rather than the EntityManager’s metamodel to detect persistent properties for entities ?
I’m not an expert here so the question is genuine out of interest to know if there are some snags to using this approach.
Second problem:
Due to the above mentioned issue I would like to provide a modified MetadataFactory to the JpaContainer , however there is not way to provide JpaContainer / Factories with an instruction to use an alternate MetadataFactory ( you use a Singleton pattern calling a static method ). Is it possible to modify JpaContainer ( at least provide constructor that takes MetaDataFactory (interface)), or some other mechanism to provide hints as to what MetadataFactory to use. For now it seems I’ll have to duplicate the JpaConainer source and add some modifications.