facebook

BUG: Extra space in generated HBM

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #333157 Reply

    adrian.challinor
    Participant

    MyEclipse 10

    When using MyEclipse to reverse engineer MYSql database to POJO’s, and generating the HBM mapping files, an extra space is created in the DTD definition. In teh DOCTYPE tag, the reference to hibernate-mapping-3.0.dtd should not have a trailing space.

    This space has to be manually removed or the mapping will fail validation when Hiberate reads the mapping file.

    
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd ">
    <!--
        Mapping file autogenerated by MyEclipse Persistence Tools
    -->
    <hibernate-mapping>
        <class name="osiris.model.Product" table="Product" catalog="data">
            <id name="id" type="java.lang.Integer">
                <column name="ID" />
                <generator class="assigned" />
            </id>
            <property name="name" type="java.lang.String">
                <column name="Name" length="45" not-null="true" />
            </property>
            <property name="price" type="java.lang.Float">
                <column name="Price" precision="12" scale="0" />
            </property>
            <set name="lineItems" inverse="true">
                <key>
                    <column name="Item" />
                </key>
                <one-to-many class="osiris.model.LineItem" />
            </set>
        </class>
    </hibernate-mapping>
    
    #333170 Reply

    adrian,

    I could replicate the issue at my end. Thanks for pointing to it.
    I have raised a PR for the dev team to look into it.

    Sorry for inconvenience caused.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: BUG: Extra space in generated HBM

You must be logged in to post in the forum log in