Our History support is at the Descriptor level. Mappings like
ManyToManyMapping and DirectCollectionMapping which perform direct
writes to tables (like the join table) need special History support but
the other mappings which do not manage tables themselves do not need
any direct History support.
Our tests can be found in the package
org.eclipse.persistence.testing.tests.history the tests simply update
an existing test model with history policies so that history is
recorded and our standard tests plus some additional history specific
tests are run against this model.
The EclipseLink User Guide has some information on how to configure
EclipseLink to record and read in history. (
http://wiki.eclipse.org/Configuring_a_Descriptor_(ELUG)#Configuring_a_History_Policy
). You will need to specify a DescriptorCustomizer to set the
HistoryPolicy on your Entities.
Effectively a history policy configured on an Enitity tells EclipseLink
how to record history and how to query for history. To query against
historical data you will need to use the native EclipseLink APIs and
either acquire a HistoricalSession or set an AsOfClause on your query.
See ( http://wiki.eclipse.org/Configuring_Historical_Sessions_(ELUG) )
the EclipseLink User Guide for details.
--Gordon
Magnus Heino wrote:
Could you please point me to a OneToOne and/or OneToMany example, test,
or anything? I all can find are tests and references to HistoryPolicy
in ManyToMany and DirectCollection.
ForeignReferenceMapping seems to have a prepareHistoricalQuery
which seems to do just about nothing. CollectionMapping or OneToMany
doesn't override it but ManyToManyMapping does. Or maybe I dont find
the right details?
Thanks!
/Magnus Heino
On Thu, Mar 19, 2009 at 3:49 PM, Gordon
Yorke <gordon.yorke@xxxxxxxxxx>
wrote:
Yes, History Policy is
supported by OneToOne, OneToMany,
DirectCollection, DirectToField (@Basic) and ManyToMany mappings. If
you need HistoryPolicy support you should be able to easily use a
bi-directional OneToMany mapping.
As a paying Oracle customer you should speak with your support contact
and your sales contact. I have cc'd our product manager to let him
know about your request.
As an EclipseLink community member file an enhancement request and vote
for it. Lobbing for the enhancement or even contributing the
functional will expedite its inclusion. You have already taken the
first step by contacting us.
--Gordon
Magnus Heino wrote:
Historical Session support is a deferred requirement for Uni-direction
One To Many Mapping. It is mentioned in the document because it is
functionality that we would like to add.
Is it supported for any kind of OneToOne mapping?
Reading org.eclipse.persistence.history.HistoryPolicy, I get the
impression that's the case? :-P Makes this feature not so usable imho.
However, ss this
functionality is not a must have for this feature it has been deferred
from this release and has yet to be targeted for a future release. If
it is important to you file an enhancement request and vote for it.
Popularity of functionality helps us plan release targets.
As a paying Oracle customer, are there other ways to get
this
functionality in place?
Thanks,
/Magnus
--Gordon
Magnus Heino wrote:
Enhancements in JPA include:
- a new 1:M mapping without that doesn't require a back pointer or a
separate join table to hold the associations.
Reading this page http://wiki.eclipse.org/EclipseLink/Development/JPA2.0/uni-directional_onetomany_mapping
I don't understand if HistoryPolicy is supported or not? Should these
development pages be read as the way things probably will be
implemented, or the way they were implemented?
Implementation sequence#3 on that page says that Historical Sessions
should be supported. A bit further down it reads that "History Policy
is not supported with this mapping.". Without a history policy, no
historical sessions afaik? Is the support for historical sessions
there, if not, will it be there in the near future, or never?
/Magnus
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
|