-->
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.  [ 1 post ] 
Author Message
 Post subject: Include annotated classes from external file
PostPosted: Mon Nov 26, 2007 11:18 am 
Newbie

Joined: Sun Sep 30, 2007 5:04 am
Posts: 2
Hello there,

I have got a simple question, but I cant find a solution to it - I would like to include annotated classes (I have really a lot) into hibernate configuration by using some include command or smth ( e.g. XInclude? ), but I cant make my head how.

Something like this would make a lot of sense to me, but is not allowed though

Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">


<hibernate-configuration>
  <session-factory>
    <!-- Enable Hibernate's automatic session context management         -->
    <property name="hibernate.dialect">
      org.hibernate.dialect.DB2Dialect
    </property>

    <!-- Echo all executed SQL to stdout -->
    <property name="show_sql">true</property>

    <xi:include href="hibernate_annotated_classes.xml" xmlns:xi="http://www.w3.org/2003/XInclude" />

  </session-factory>
</hibernate-configuration>


or smth like this would be nice too:

Code:
<mapping class="my.package.models.* />


I need to include it, cause I have a couple of hibernate configuration files, which I use to generate schema for a number of DBs and to have all the classes listed in each and every hibernate config file sounds like a very stupid idea.

Thnx for tips

--
Regards


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

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.