Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] em.merge() ignore.

If I understand EntityManager#merge(Object) correctly it just merge
the Object with eclipselink but do not any database operation.
To persist the changes you have to use EntityManager#persist(Object),
thus eclipselink do update the already existing entry in the database.

Hope that helps and please correct when I'm wrong ;)

-- Christian



2011/4/20 José Arcángel Salazar Delgado <arcangel.salazar@xxxxxxxxxxxxxxxxxx>:
> Hello.
>
> I'm having some troubles with a estrage behaviour.  This is my flow:
>
> 1.- Get a List of objects of a determinate type.
> 2.- modify one atribute of the object.
> 3.- make a for each and do em.merge(object).
>
> Unfortunately the em.merge is ignore (I kwno that because in the logging of
> eclipselink I never see and UPDATE statement). If instead I use a JQPL update
> query to do the modification, every thing works as espected.
>
> My question, what error  or problem can affect the em.merge to not work
> silently (no exceptions are throws)??
>
> These methods worked well until I add to String atributes to the object.
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top