Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] What is the correct way to remove master-detail relation

Leon,
Remove it from your list directly, and as long as you have
CascadeType.REMOVE set on your relationship it will remove it from the
database.

Tim

On Mon, Jun 2, 2008 at 12:02 PM, Leon Derks <leon.derks@xxxxxxxxxx> wrote:
> Hello
>
> I have the follwing Objects:
>
> Product {
> List<Characteristic> characteristics;
> List<ImageInfo>imageInfos
> }
>
> Characteristic{
> Product product;
> }
> ImageInfo{
> Product product.
> }
>
> But what is the best way to remove a Characteristic object?
>
> I prefer doing: entityManager.remove(characteristic);
> But then the characteristic is still in the List in the Product. Why isn't
> the entity cache automatically updated?
> How can I clear the cache manually?
>
> Leon
>
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>



-- 
./tch


Back to the top