Here's what i did: The entity bean is field mapped and the getters/setters 
convert between Collection and Array.

A sample:


  | public class MyEntityBean implements java.io.Serializable {
  |     @Id
  |     @Column(name="id")
  |     private int id;
  |         ...
  |     @OneToMany(mappedBy = "abc")
  |     private Set<ColumnHeader> colHeaders;
  |         ...
  |     public ColumnHeader[] getColumns() {
  |         return this.colHeaders.toArray(new ColumnHeader[ 
this.colHeaders.size() ]);
  |     }
  |     public void setColumns(ColumnHeader[] colHeaders) {
  |         this.colHeaders.clear();
  |         for (int i = 0; i < colHeaders.length; i++) {
  |             this.colHeaders.add(colHeaders[ i ]);
  |         }
  |     }
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961781#3961781

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961781
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to