[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6483) Add addJar() and addClassesFromPackage() to EntityManagerFactoryBuilder

Steve Mitchell (JIRA) noreply at atlassian.com
Tue Mar 6 00:06:48 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-6483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45841#comment-45841 ] 

Steve Mitchell commented on HHH-6483:
-------------------------------------

Also ejb3Configuration.getClassMappings() has no substitute.

> Add addJar() and addClassesFromPackage() to EntityManagerFactoryBuilder
> -----------------------------------------------------------------------
>
>                 Key: HHH-6483
>                 URL: https://hibernate.onjira.com/browse/HHH-6483
>             Project: Hibernate ORM
>          Issue Type: New Feature
>          Components: entity-manager
>    Affects Versions: 4.0.0.Beta5
>            Reporter: Ondra Žižka
>
> JPA's persistence.xml has <jar-file> :
> {code}
> <persistence>
>   <persistence-unit name="TestPU">
>     <jta-data-source>java:/TestDS</jta-data-source>
>     <jar-file>foo/bar/entities.jar</jar-file>
>   </persistence-unit>
> </persistence> 
> {code}
> It would be fine to have  Ejb3Configuration.addClassesFromJar() with the same effect.
> Also, Ejb3Configuration.addClassesFromPackage() would be handy, which would find package-info.class and scan it's place (dir, jar, ...) for entities
> (assuming a package is in one place only).
> After HHH-6159, they would be EntityManagerFactoryBuilder.addClassesFromJar() and EntityManagerFactoryBuilder.addClassesFromPackage(), respectively.
> Without this feature, users tend to hack their own scanning or use external lib like Scannotation, which is pitty since scanning code is already in Hibernate.
> Thanks for considering.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list