[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Reference in an Embeddable
|
Hi Michael,
Here is what is allowed from the spec:
An embeddable class may contain a relationship to an entity or collection of
entities. Since instances of
embeddable classes themselves have no persistent identity, the relationship from
the referenced entity is
to the entity that contains the embeddable instance(s) and not to the embeddable
itself.[17] An
embeddable class that is used as an embedded id or as a map key must not contain
such a relationship.
-Tom
On 09/02/2012 10:54 AM, Michael Simons wrote:
Hello,
is it possible to put a reference in a an @Embeddable like this:
@Embeddable public class A {
...
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="packing_id", nullable=false)
private Packing pack;
}
Kind Regards, Michael
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users