Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Lazy OneToOne Relationship traversed on Insert(Lazy OneToOne Relationship traversed on Insert)
Lazy OneToOne Relationship traversed on Insert [message #1478892] Wed, 19 November 2014 02:31
Jason Spies is currently offline Jason SpiesFriend
Messages: 1
Registered: November 2014
Junior Member
Hi - I am running Eclipselink 2.5.1 in JBoss with JPA and have a table/entity class Indicator with a FetchType.Lazy OneToOne relationship to four other tables.

Based on the type of Indicator - none or only one of the other tables will have data added. The OneToOne Lazy relationship actually works fine on select. If I select all indicators or a specific indicator, no other tables are fetched from the database until I call the appropriate getter for the specific table/relationship.

However, on persist/insert of a record to the Indicator table, it immediately selects the last inserted ID (it's using Identity Generation), selects the Indicator record with that id, and then does a select for each of the other four tables.

On bulk loading of data this is creating a huge amount of extra selects.

I saw this behavior on Glassfish with Eclipselink 2.4.x as well as now on JBoss with 2.5.2. I have tried both dynamic weaving and static weaving. All have worked correctly for selecting data, but all have always selected all related OneToOne relationships immediately after insert.

Any thoughts or help would be greatly appreciated.

Thanks,
Jason


Previous Topic:Generated metamodel doesn't extend base metamodel from another jar
Next Topic:EclipseLink with Ucanaccess driver
Goto Forum:
  


Current Time: Wed Feb 28 06:22:56 GMT 2024

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

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

Back to the top