TopLink Essentials does not have any built-in historization support. So you
could try this directly by mirroring your classes with a <class>Version
class that stores the history. You could define a @OneToMany relationship
from the class to its history. Your application would need to add a new
version to its history for every update. You may also want an isDeleted
flag in your version object to know that is no longer exists. You could try
to automate adding the version objects to the history through events, such
as the JPA prePersist and preUpdate events, or the TopLink preInsert and
preUpdate events.
The Oracle TopLink product does have built-in historization support, so you
may wish to investigate this in the TopLink 11g preview release. You just
need to config the TopLink descriptor to support history, then it will take
care of maintaining a history table and allow historical querying.
Hurragutt wrote:
>
> Hi.
> Have anyone tried to implement Martin Fowlers Temporal Property
> (http://www.martinfowler.com/eaaDev/TemporalProperty.html) pattern
> using JPA?
>
> Or Temporal Object (http://www.martinfowler.com/eaaDev/TemporalObject.html
> )?
>
> Sincerely,
> Paul Nyheim
>
>
--
View this message in context: http://www.nabble.com/Implementing-Temporal-Property-%28or-Temporal-Object%29-using-JPA--tf4340306.html#a12414231
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.