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.  [ 2 posts ] 
Author Message
 Post subject: How load all annotated classes in 1 package in config ?
PostPosted: Mon Jun 05, 2006 1:37 am 
Newbie

Joined: Sun Jun 04, 2006 10:28 pm
Posts: 2
Location: Australia
Hi,

This is my first posting to Hibernate. Thanks for Hibernate ! I am enjoying working through your tutorials.

Q: How can I load all classes in a package (without declaring each <mapping class="Class"/> ?

Q: Where can I find source and XML for the annotations examples (test/animals/orm.xml) ?

Hibernate version:

hibernate-3.2
hibernate-annotations-3.2.0.CR1

Mapping documents:

hibernate.cfg.xml

Code:
<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

        <hibernate-configuration>
          <session-factory>
            <mapping package="test.animals"/>
            <mapping class="test.Flight"/>
            <mapping class="test.Sky"/>
            <mapping class="test.Person"/>
            <mapping class="test.animals.Dog"/>
            <mapping resource="test/animals/orm.xml"/>
          </session-factory>
        </hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: How load all annotated classes in 1 package in config ?
PostPosted: Mon Jun 05, 2006 7:38 am 
Beginner
Beginner

Joined: Wed May 17, 2006 3:38 am
Posts: 45
webel wrote:
Hi,

Q: How can I load all classes in a package (without declaring each <mapping class="Class"/> ?

Q: Where can I find source and XML for the annotations examples (test/animals/orm.xml) ?

[/code]



For Q#1, I do know anything that allows hibernate to load all classes...why on earth would you like to load all classes...experts are sweating out there working on how to limit/optimize loading of all classes and work with only that is necessary.

For Q#2 well, I am not sure.

_________________
===============================
Rate, if it helped


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.