-->
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.  [ 4 posts ] 
Author Message
 Post subject: Very very short and easy Question
PostPosted: Thu Mar 30, 2006 6:22 am 
Newbie

Joined: Fri Feb 03, 2006 10:14 am
Posts: 9
Hi,
short short Question.

Has the MappingFile to be in the same Package or Folder like the mappedClass ?


Thx and Greets


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 7:28 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
No.
But you need to put the property package of hibernate-mapping.

ex: <hibernate-mapping package="es.lnm.ucae.model">

or
you need your classes with full name.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 7:52 am 
Newbie

Joined: Fri Feb 03, 2006 10:14 am
Posts: 9
Hi,
what do u mean with "or you need your classes with full name" ?

Greets


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 7:59 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
something like this:

Code:
<hibernate-mapping package="es.lnm.ucae.model.requisitos">
   <class
      name="es.lnm.ucae.model.Requisito"
      table="requisito"
   >

      <!-- P * Puesto -->
      <subclass name="RequisitoPuesto" discriminator-value="P"/>
      
      <!-- Z * Zona -->
      <subclass name="RequisitoZona" discriminator-value="Z"/>
      
      <!-- E * Subempresa -->
      <subclass name="RequisitoSubempresa"discriminator-value="E"/>
   <class/>
</hibernate-mapping>


The root class is in package es.lnm.ucae.model and subclasses are in package es.lnm.ucae.model.requisitos.
Because the package especified in <hibernate-mapping> is es.lnm.ucae.model.requisitos I have to name the class with its full name name="es.lnm.ucae.model.Requisito"


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