[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Unable to implement update for existing source object to point to existing target object
|
This code looks strange:
depBuilder.addOneToManyMapping("empinfo.depinfo", empBuilder.getType(),
"depid");
empBuilder.addOneToOneMapping("empinfo.depinfo", depBuilder.getType(),
"depid");
IMHO, it should be like this:
depBuilder.addOneToManyMapping("employees", empBuilder.getType(), "depid");
empBuilder.addOneToOneMapping("department", depBuilder.getType(), "depid");
Besides that, consider establishing the "mapped-by"-connection between both
mappings.
HTH,
Frank
Rohit Banga-2 wrote:
>
> Just to add
> I have attached some sample code. In the code I am having a relationship
> between the employee and phone tables as well but that should not make a
> difference.
>
>
--
View this message in context: http://old.nabble.com/Unable-to-implement-update-for-existing-source-object-to-point-to-existing-target-object-tp30575842p30598877.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.