[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-624) Autodiscover all @Entity-annotated Classes

James Carman (JIRA) noreply at atlassian.com
Mon Jun 11 17:34:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27217 ] 

James Carman commented on ANN-624:
----------------------------------

What I'm saying is that we should move the JarVisitor stuff down into Hibernate Annotations.  So, you'd do something like this...

public void addAutodiscoveredEntities()
{
  1.  Find all classes on the classpath (thread context classloader?) that have the @Entity annotation on them.
  2.  Call addAnnotationClass() using each of those classes.
}

This way, I don't have to load up the EntityManager stuff at all and I can use pure Hibernate.

> Autodiscover all @Entity-annotated Classes
> ------------------------------------------
>
>                 Key: ANN-624
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-624
>             Project: Hibernate Annotations
>          Issue Type: New Feature
>            Reporter: James Carman
>
> The EntityManager implementation contains an "autodiscovery" feature that would be nice to have added to the core Hibernate library.  Maybe we could add an AnnotationConfiguration.addAutodiscoveredEntities() method?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list