Page 1 of 1

About Question enthuware.oce-jpad.v6.2.427 :

Posted: Thu Mar 15, 2012 5:41 pm
by M_Z

Code: Select all

@OneToMany(cascade = {CascadeType.ALL }, targetEntity=OrderLineItem.class, mappedBy="custOrder")
private List<OrderLineItem> lineItems;
The "targetEntity" attribut should be defined only when Java generics not used. Here it does not make sense.

Re: About Question enthuware.oce-jpad.v6.2.427 :

Posted: Fri Mar 16, 2012 11:57 am
by admin
You are right, targetEntity is required only when generics are not used to specify the field type. It is not wrong to specify it though.
It has now been removed.

thank you for your feedback!