Note that there are some explanatory texts on larger screens.

plurals
  1. POMigrating Hibernate .hbm to annotations
    text
    copied!<p>I am currently migrating an older application from hbm mappings to annotations. I have read numerous places stating that it is possible to do this, including the hibernate docs. I am running into trouble when I try to reference an annotated class from an hbm mapped with a many-to-one relationship. </p> <p>I am getting the following error complaining about the annotated class.</p> <p>"nested exception is org.hibernate.MappingException: Association references unmapped class: ...cepis.domain.Note" </p> <p>Is it possible to achieve what I want here, is there something very basic that I am missing (note like I said I have read numerous times that it is possible so a simple "yes it is possible" will not be of much help)? </p> <p>My session factory is defined as follows ...</p> <pre><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" scope="singleton"&gt; &lt;property name="dataSource" ref="itc5DataSource" /&gt; &lt;property name="mappingResources"&gt; &lt;list&gt; &lt;value&gt;edu/uky/cepis/User.hbm.xml&lt;/value&gt;... &lt;/list&gt; &lt;/property&gt; &lt;property name="annotatedClasses"&gt; &lt;list&gt; &lt;value&gt;edu.uky.cepis.domain.Note&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;property name="hibernateProperties"&gt; &lt;props&gt; &lt;prop key="hibernate.dialect"&gt;${itc5.dialect}&lt;/prop&gt; ... &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>Thank you so much for any help in advance!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload