-->
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.  [ 2 posts ] 
Author Message
 Post subject: properties tag and hbm2java
PostPosted: Thu Jun 16, 2005 3:36 pm 
Newbie

Joined: Thu Jun 16, 2005 3:21 pm
Posts: 1
Using Hibernating 3.0.5 and Tools 3.0alpha4...

I am new to Hibernate, so I may be misunderstanding how the properties tag works.

I am trying to use the properties tag to specify that the combination of 2 columns should be unique.

A simplified version of the .hbm.xml below:

Code:

  <class name="Foo">
    <id name="id" type="long">
       <generator class="native"/>
    </id>

    <properties name="uniqueCombo" unique="true">
       <property name="prop1" type="string"/>
       <property name="prop2" type="string"/>
    </properties>

    <property name="prop3" type="string"/>
    <property name="prop4" type="string"/>

    <many-to-one name="bar" class="Bar" column="bar_id"/>

  </class>

  ...



When I run this through the hbm2java Ant task, the only properties of the POJO are prop1 and prop2 (the ones nested inside the properties tag). The other properties/associations are missing.

But when I run this through the hbm2ddl Ant task, it produces db columns for all of the properties (both those nested inside the properties tag, as well as the ones outside of the properties tag).

Misunderstanding how the properties tag works? Bug in hbm2java?

Please help.

Thanks in advance.


-Tim.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 16, 2005 5:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
known bug in jira

_________________
Max
Don't forget to rate


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