Since OpenMRS 1.9.2 it is possible to use JPA annotations in modules. See more at:
Univ Call http://connect.iu.edu/p6erdt413mz/ with code at https://github.com/rkorytkowski/openmrs-module-example-social/commit/43f8f82d2a93d9de7d89ee77964917e7dedafc54
https://github.com/rapilabs/openmrs-jpa-annotation-testÂ
Usage in core:Â https://github.com/rkorytkowski/openmrs-core/commit/416ca5addf1c50ba65c6982fc55aaceb142d2e44