Anatol Pomozov wrote:

With hibernate-1.0.1 plugin you sould use use following tags
/**
 * @hibernate.properties name="name"
 */
public class myClass {

  /**
   *  @hibernate.property properties-name="name"
   */
  public String getString1();

  /**
   * @hibernate.property properties-name="name"
   */
  public String getString2();

  /**
   * @hibernate.property properties-name="name"
   */
  public String getString3();
}


On 6/29/05, Paul Galbraith <[EMAIL PROTECTED]> wrote:
If I have a java class with three properties, all three of which I want
to be included in a Hibernate <properties> element, how would I mark up
the class for the element to be generated properly?

/**
* ?
*/
public class myClass {

 /**
  * ?
  */
 public String getString1();

 /**
  * ?
  */
 public String getString2();

 /**
  * ?
  */
 public String getString3();
}

to generate this in mapping xml:

<properties name="name">
 <property name="String1"/>
 <property name="String2"/>
 <property name="String3"/>
</properties


Thanks, Anatol.

Hypothetically, what do you think of a more generic solution to this type of situation? Something like a "element-id" tag on the parent element, and a "parent-element" tag on its children, to allow someone to explicitly specify the element hierarchy they want? I was thinking of something like this for XD1. It would provide a nice consistent way to handle the odd cases like this.

E.g., in the above example:

/**
 * @hibernate.properties element-id="myproperties"
 */
public class myClass {

  /**
   *  @hibernate.property parent-name="myproperties"
   */
  public String getString1();

  /**
   * @hibernate.property parent-name="myproperties"
   */
  public String getString2();

  /**
   * @hibernate.property parent-name="myproperties"
   */
  public String getString3();
}




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to