-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: ant.HibernateToolTask - annotationconfiguration - classpath?
PostPosted: Wed Feb 15, 2006 12:09 pm 
Regular
Regular

Joined: Sun Sep 26, 2004 9:27 pm
Posts: 75
Location: Atlanta, GA, USA
Is there a way, or are there plans to incorporate, an annotationconfiguration strategy that searches the given classpath(s) for @Entity objects, and will use them instead of a list of <mapping class=...> within a cfg.xml?

If not, just let me know, and I'll write something dirty, and post it back here.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 15, 2006 12:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
In jira we have tasks for using a Ejb3Configuration to get the same behavior as with EJB3, but that is still work in progress.

If you have something that can work as a cheap workaround until then
patches are welcome in jira.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 5:31 pm 
Regular
Regular

Joined: Sun Sep 26, 2004 9:27 pm
Posts: 75
Location: Atlanta, GA, USA
I would propose additions to the hibernate-configuration-3.0.dtd, to make the following possible.

Code:
      <mapping path="/dev/p2pgames/modules">
         <include name="p2p.games.*" />
         <exclude name="p2p.io.*" />
      </mapping>


Where "include" elements would declare classes with wildcards to include, and "exclude" elements ignore those classes in the path. If the body of "mapping" is empty, all classes would be included.

This could also be applied to the "jar" and maybe "package" attributes, but I don't know enough about them. I also don't know the future of the ejbconfiguration, as you stated.

So let me know if you want me to proceed. If this is not dirty enough, I have another, dirtier idea.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 6:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it does not make sense to add that to hibernate-mapping.dtd....

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 7:01 pm 
Regular
Regular

Joined: Sun Sep 26, 2004 9:27 pm
Posts: 75
Location: Atlanta, GA, USA
Understood. I'll make something less sexy.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.