It has become evident with integrations with Hibernate Search and Hibernate Envers that there are domain specific entity models that ideally would be useful to be module/system/domain -scoped to these integrations rather than be exposing them as a part of the user-scoped domain model. A few ideas of brainstorming are: For example, providing an @Hidden annotation that allows an entity model to be identified as something which isn't part of the user-scoped domain model. There are other alternatives for providing mappings such as JAXB or manually providing the mapping model to Hibernate in which we'd need to add support for these new system-scoped models. For cases where the class may not be on the Hibernate ClassLoader, such as WildFly, we'd also need to provide a way for the class to be provided to Hibernate directly. And lastly, we'd need to provide a way for these module/system/domain -scoped models to be queryable by their respective domains at runtime, while protecting them from normal user queries. |