Using EJB3/JBoss, how can I use a composite element from a table, e.g.
@Entity
public class X {
@Id
private int id;
private Coordinate coordinate;
}
where Coordinate
is a defined as (setters/getters left out for readability):
public class Coordinate {
int x;
int y;
}
And everything should be mapped to Table X
which contains columns id
, x
, y
.