Joined: Mon Jun 02, 2008 2:42 am Posts: 1
|
Hi,
I'm testing a JPA project in eclipse to connect to a legacy database. The tables are purchaseOrderHdr and purchaseOrderLine. Now the tables both have a decimal field (ref) with a unique index on it. (that is the primary key as such.) This is also the foriegn key for the lines table.
Looking at setting up a one to many relationship. Can I map this column as an @ID and also @OneToMany? The eclipse GUI only supports one map as option.
@Entity
public class purchaseOrderHdr implements Serializable {
@Id
@OneToMany
private BigDecimal phintref;
}
Thanks
David
|
|