Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Persistence Units definitions are conflicting?(Using two persistence units, one with annotation and on with orm.xml causes weird behaviour.)
Persistence Units definitions are conflicting? [message #1849402] Mon, 17 January 2022 23:56 Go to next message
Hans Pikkemaat is currently offline Hans PikkemaatFriend
Messages: 9
Registered: January 2021
Junior Member
Hi,

I want to use one class and two JPA persistence units and as such to be able to store data in different tables (or even databases) and different definitions.

According to the JPA2.2 specification this should be possible but I experience weird behaviour. I'm using payara which uses eclipselink.

For a complete description and a reproducer see this github project:

https://github.com/thehpi/jpa-issue

I hope someone can help me.


Re: Persistence Units definitions are conflicting? [message #1849667 is a reply to message #1849402] Fri, 28 January 2022 16:27 Go to previous message
Hans Pikkemaat is currently offline Hans PikkemaatFriend
Messages: 9
Registered: January 2021
Junior Member
The issue here is weaving. Weaving is done on the one model class but the resulting class depends on persistence.xml/orm.xml.

So having one model class and two persistence.xml/orm.xml definitions will not work.

For more info see here https://stackoverflow.com/questions/70748822/jpa-persistence-unit-definitions-are-conflicting/70896886#70896886
Previous Topic:duplicate persistence classes in classpath
Next Topic:Downloading EclipseLink5.2.5 -> EclispeLink2.3.3 gives empty zip error
Goto Forum:
  


Current Time: Thu Apr 25 09:24:14 GMT 2024

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

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

Back to the top