Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » migrating from openjpa to eclipselink(migrating from openjpa to eclipselink)
migrating from openjpa to eclipselink [message #1854177] Thu, 04 August 2022 18:18 Go to next message
arun rajan is currently offline arun rajanFriend
Messages: 2
Registered: August 2022
Junior Member
I was migrating from openjpa (2.2.2) to eclipselink(2.5.2) in my legacy project.
During migration, I could see following code snippet which is specific to openjpa:

OpenJPAEntityManager kem = OpenJPAPersistence.cast(em);
kem.getFetchPlan().addField(Test.class, "stringvalue");
kem.getFetchPlan().addField(Test.class, "other string value");
if (!(em instanceof OpenJPAEntityManager)) {
kem.close();
}

Please help to find corresponding eclipselink related code to this code snippet.
Re: migrating from openjpa to eclipselink [message #1854234 is a reply to message #1854177] Mon, 08 August 2022 17:19 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 54
Registered: December 2021
Member
I don't know why they would close the EM if it isn't an instance of OpenJPAEntityManager, but the rest looks like something that should be converted to JPA specifics through the use of fetch joins (if these are relationships) in queries, or entity (load and fetch) graphs passed to queries. You can modify descriptors and mappings in EclipseLink, but I wouldn't advise it, as such changes are shared in many cases and these involve initialization.
Previous Topic:RollbackException on commit but transaction was successful.
Next Topic:Wrong detected type for MIN operator - I think?
Goto Forum:
  


Current Time: Sun Dec 08 13:44:14 GMT 2024

Powered by FUDForum. Page generated in 0.03330 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top