[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] Newbie mapping question
- From: "Guy Pelletier" <guy.pelletier@xxxxxxxxxx>
- Date: Thu, 11 Sep 2008 07:11:04 -0400
- Delivered-to: firstname.lastname@example.org
- Organization: Oracle
Your mapped by is incorrect and should be specified as follows:
And your JoinColumn is inversed. It should be
----- Original Message -----
From: "SerFingolfin" <paolo.trisio@xxxxxxxxx>
Sent: Thursday, September 11, 2008 6:26 AM
Subject: [eclipselink-users] Newbie mapping question
Hi to everybody.
My project works on two entities with a "one to many" relation.
A entity defines a collection of B elements as described here :
@OneToMany(cascade = CascadeType.ALL, mappedBy = Bkeyname, fetch =
private Collection bcollection;
And B relates to A like this:
@JoinColumn(name = Bkeyname, referencedColumnName = Akeyname)
private A relateda;
Fetch = FetchType.EAGER should grant me that every "find" operation
on A should retrieve every B entity related to A, am i wrong?
This is not happening in my project! I always see null values on B
what am i doing wrong?
Thanks in advance
View this message in context:
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
eclipselink-users mailing list