facebook

hibernate.reveng.xml does not validate foreign-key element

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

    mikaeln
    Member

    Hi,

    I’m trying to control the name of the property (and set) that is generated for a foreign key, by writing

    <foreign-key constraint-name=”FK_OMRAADE_BRUKER”>
    <many-to-one property=”user”/>
    <set property=”areas”/>
    </foreign-key>

    inside a table definition, but this gives a validate error (‘Attribute “constraint-name” must be declared for element type “foreign-key” ‘) in the hibernate.reveng.xml file and the reverse engineering process ignores the file alltogether. The xml is correct according to the documentation for Hibernate Tools, and as far as can see the DTD (see below) agrees.

    I’m using MyEclipse 5GA, Hibernate 3.1 and the reveng file header says <!DOCTYPE hibernate-reverse-engineering PUBLIC “-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN” “http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd&#8221; >

    What am I missing?

    -Mikael

    #257619 Reply

    Brian Fernandes
    Moderator

    Mikael,

    The version of Hibernate Tools we use internally (roughly Hibernate Tool beta 4) does not recognize these attributes as they were added in a later version of Hibernate Tools.
    This is why you see validation errors for these documents, the internal cached DTD is being used for validation and it is not equivalent to the DTD you currently see online.

    We only really support whatever attributes we expose through the UI in the RE wizard pages right now. We will integrate a more recent version of Hibernate Tools in a future release, when those attributes should work.
    Sorry for the inconvenience caused,

    Best,
    Brian.

    #257708 Reply

    mikaeln
    Member

    Ok, I can manage by running the latest version of Hibernate Tools using Ant for now. Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: hibernate.reveng.xml does not validate foreign-key element

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