Can I use an entity reference as part of a composite primary key, like this?
@Embeddable
public class FavoritePK implements java.io.Serializable
{
/** */
@ManyToOne
@JoinColumn(name="ownerId")
Person owner;
@ManyToOne
@JoinColumn(name="targetId")
Person target;
/** */
public FavoritePK() {}
/** */
public FavoritePK(Person owner, Person target)
{
this.owner = owner;
this.target = target;
}
...
The doc indicates that it is not yet supported.
I've commited in CVS support for association inside a non id embedded object though