Persist data when the table was not mapped (JPA EclipseLink)
- by enrique
Hi everybody
I need some help in persisting data into a table that has not been mapped...
The issue is that the database we have has a table which all of its columns are foreign keys so by mapping the whole database all of the tables are correctly mapped. However that table called "category" is not mapped. The way in which we can browse the data is by passing for the table I mentioned using the @jointable annotation which was set by the system in the other tables with which "category" has a relation.
So we can go ahead and using the collections and perform a query. But the issue comes when I want to persist data into that table because there´s no any entity.
We tried to persist through the collections but no luck. Then I have just tried by creating the entity with its PK and Facade all by hand. However when I try to persist using the Merge method the system tries to perform an Insert when it is supposed to perform an Update. So obviously it returns an error.
Does anybody have an idea on this situation?
Thanks.-