[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Virtual Metlhods | questions
|
Hi Tom,
Yes indeed, I have session customizer which created the mappings
based on the configured meta-data.
Since I am using eclipse 2.3, I cannot use
eclipselink.metadata-source? I think its available in eclipselink 2.4
~Gaurav
On 24-07-2012 09:37 PM, Tom Ware wrote:
The refreshMetadata call causes the whole EntityManagerFactory to
reinitialize, potentially with new metadata - basically it restarts
the bootstrapping of an EntityManagerFactory from the beginning. The
main reason we provide that method is for those that are providing an
eclipselink.metadata-source in their persistence unit setup. If you
have customizers or event listeners that customize the mappings based
on data that may change, it could also be used for that. Is that what
you are using it for?
Basically, if you want the underlying mappings in an
EntityManagerFactory to change after you have used it, that is the way
to do it.
-Tom
On 24/07/2012 3:27 PM, Gaurav Malhotra wrote:
Hi Tom,
In real application I have to make following call to make programtic
relationships creation on the fly to make the things work
JpaHelper.getEntityManagerFactory(<entityManager>).refreshMetadata(null);
What I found at the object building phase, the following statement
always
results in the NULL for the newly creationed relationships
oneToManyMapping.getSelectionQuery().getDescriptor()
Hence resulted in NPE.
Please validate that
JpaHelper.getEntityManagerFactory(<entityManager>).refreshMetadata(null);
is
OK.
I found the above call resulted in the increase in deployment time
(which i
also expected). Is there any other API I can use?? which can decrease my
deployment time.
~Gaurav Malhotra
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users