-->
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.  [ 3 posts ] 
Author Message
 Post subject: Code generation doesn't pick up hbm.xml changes
PostPosted: Fri Feb 24, 2006 12:17 pm 
Newbie

Joined: Fri Feb 24, 2006 9:15 am
Posts: 17
Hello,

It seems that changes in the mapping document aren't picked up when I try to generate code.
I've defined a console configuration, it points to a configuration file hibernate.cfg.xml, and I've also specified the mapping file in the console configuration. The mapping file is located where the generated source files are.
Now I can change the mapping file, but it doesn't get reflected in the generated files. Is there some place I can find a log to see what's going on? Is there something I should do to have the mapping file being taken into account?

Regards, Bo

Hibernate version: hibernate tool 3.1.0 beta4

Mapping documents:

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 24-feb-2006 13:30:37 by Hibernate Tools 3.1.0.beta4 -->
<hibernate-mapping>
    <class name="es.cofas.facturacion.hibernate.FarmaCuenta" table="fcuenta01">
      <meta attribute="generated-class">es.cofas.facturacion.hibernate.FarmaCuentaBase</meta>
      <meta attribute="scope-class">public abstract</meta>
        <composite-id name="id" class="es.cofas.facturacion.hibernate.FarmaCuentaId">
            <key-property name="cliente" type="string">
                <column name="cliente" length="12" />
            </key-property>
            <key-property name="periodo" type="int">
                <column name="periodo" />
            </key-property>
            <key-property name="orden" type="int">
                <column name="orden" />
            </key-property>
        </composite-id>
        <property name="fecha" type="java.lang.Integer">
            <column name="fecha" />
        </property>
        <property name="concepto" type="string">
            <column name="concepto" length="50" />
        </property>
        <property name="acreedor" type="java.lang.Float">
            <column name="acreedor" precision="4" scale="0" />
        </property>
        <property name="deudor" type="java.lang.Float">
            <column name="deudor" precision="4" scale="0" />
        </property>
        <property name="saldo" type="java.lang.Float">
            <column name="saldo" precision="4" scale="0" />
        </property>
        <property name="fechaval" type="java.lang.Integer">
            <column name="fechaval" />
        </property>
        <property name="tipo" type="string">
            <column name="tipo" length="1" />
        </property>
    </class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 12:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
and you are not using reverse engineering ? if you are the reverse engineering overrides whatever mapping files you have.

Otherwise the mapping files should be reread on every codegen...if not, please submit a bug report to jira for how to reproduce it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 12:55 pm 
Newbie

Joined: Fri Feb 24, 2006 9:15 am
Posts: 17
Yes, I was using reverse engineering, I wasn't aware that it should only be activated once. It's solved now, thanks!

Regards, Bo


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