• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use @hibernate.primitive-array xdoclet-tag

 
Anatoliy Martsenyuk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

Did anybody use hibernate xdoclet-tag @hibernate.primitive-array? I have not found any real example in the web.
It is necessary to map such a field:

private double[] units;
....
public double[] getUnits() {
return units;
}

public void setUnits(double[] units) {
this.units = units;
}

May be exist the other way to do this?
Thanks in advance for any help.
 
Ghulam Rashid
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you look into the Tag Ref, probably you may get detail idea.XDoclet and XDoclet Hibernate
 
Anatoliy Martsenyuk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. I've found the solution.

/**
* @hibernate.primitive-array table="Units"
* @hibernate.collection-key column="parentId"
* @hibernate.collection-element column="val" type="double"
* @hibernate.collection-index column="id"
*/
public double[] getUnits() {
return units;
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic