You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ramasubramanian Sankar (HCL Financial Services)" <rs...@hcl.in> on 2009/02/20 15:59:00 UTC

Regd. OpenJPA feature

In our application we have a requirement of changing the relationships
between tables i.e. entities dynamically based on transactions. The
scenario is described below:

 

There are 3 entities A, B and C available in the system. A is related to
B and C in the database with foreign key. In transaction 1 the entities
A and B are related and have to be fetched together for these 2 entities
only. In transaction 2 A and C are only required but not B. Currently we
are using Hibernate as the data access framework. Since the
relationships have to be provided on static XMLs and cannot be changed
later the system is retrieving the records of C also. Hence we are
looking for the right Data Access framework to enable this functionality
of changing relationships between entities at runtime. Please let us
know whether OpenJPA supports this feature since I am not able to obtain
much information from the documentation regarding this.

 

 

Regards,

Ram



DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

Re: Regd. OpenJPA feature

Posted by MiƂosz Tylenda <mt...@o2.pl>.
Ram,

Have you considered using fetch groups? They can be activated and deactivated at runtime. For details see

http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_fetch

Also, there were some discussions on fetch groups on OpenJPA Users or Dev mailing lists in the recent months.

Cheers,
Milosz


> In our application we have a requirement of changing the relationships
> between tables i.e. entities dynamically based on transactions. The
> scenario is described below:
> 
>  
> 
> There are 3 entities A, B and C available in the system. A is related to
> B and C in the database with foreign key. In transaction 1 the entities
> A and B are related and have to be fetched together for these 2 entities
> only. In transaction 2 A and C are only required but not B. Currently we
> are using Hibernate as the data access framework. Since the
> relationships have to be provided on static XMLs and cannot be changed
> later the system is retrieving the records of C also. Hence we are
> looking for the right Data Access framework to enable this functionality
> of changing relationships between entities at runtime. Please let us
> know whether OpenJPA supports this feature since I am not able to obtain
> much information from the documentation regarding this.
> 
>  
> 
>  
> 
> Regards,
> 
> Ram
> 
> 
> 
> DISCLAIMER:
> -----------------------------------------------------------------------------------------------------------------------
> 
> The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
> this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
> this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender immediately. Before opening any mail and 
> attachments please check them for viruses and defect.
> 
> -----------------------------------------------------------------------------------------------------------------------