Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] ObjectChangeSet old value

I can't really help you there, I never got in that deep.

My strategy is basically to rely on the transaction to rollback to
original values when needed, my app is a thick client so I simply use
the unit of work to check if there are changes period, not what
exactly they are.

Judging from the previous thread it looks like the unit of work API is
not exactly user friendly, you might be better off trying a different
strategy in your web app....I could be wrong though :)


On Tue, Jul 15, 2008 at 9:19 AM, Mathias Walter <> wrote:
> Hi Tim,
>> Mathias, I believe this was brought up on the mailing list before see:
> I saw this posted. But in my situation, I don't have access to the old
> properties anymore (because the entity is stored in a conversion scope of my
> webapp and any html form changes are performed transparently by the web
> framework). That's why I used getUnitOfWorkChangeSet.
> EclipseLink must know the previous values to compute the object change set.
> Now I want to know how I can access these previous values or the old entity
> object.
> Neither em.merge(entity) nor uow.getOriginalVersionOfObject() return the old
> object.
> BTW: In your posted solution, the ObjectChangeSet does not return the old
> value too.
> Even if I can get the old object, I don't know how to access the attributes
> listed in ObjectChangeSet.getChangedAttributeNames(). How did you do that?
> Did you use the reflection API?
> --
> Kind regards,
> Mathias
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

Back to the top