openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Siegel" <marc.siegel...@gmail.com>
Subject Re: Merge not working as SaveOrUpdate
Date Mon, 19 Nov 2007 00:11:38 GMT
> Simple fail example:
>
>  RRole role = new RRole(99999l, "dasf", "df");
>  rroleService.add(role);
>  role = new RRole(99999l, "dasffsdf", "df");
>  rroleService.update(role);
>
> Where update:
>  RRole mergedEntity = em.merge(entity);
>  em.persist(mergedEntity);

I don't think you need to call persist(), just merge()

Right?

-Marc

Mime
View raw message