My Application is using Hibernate as JPA implementation provider. When I try to persist a bean using the Entity Manager, I'm having a JDBC ERROR saying that the entity doesn't exist in postgresql. Due I have show_sql on true I saw the following query: "insert into my_entity.....", so I went to pgAdmin and tried to run the same query and had an error, then put the schema name before the entity and it worked. query: "insert into my_schema.my_entity....."
After some googling I found the "default_schema" prameter for the persistence.xml cofiguration file. I tried that without success.
Is there any way to include the scema on the queries?
Anibal Gimenez Canicoba
posted 10 years ago
I found a solution.
I had to remove the default_schema from my persistence.xml file and generate the model again. Now, the entities are generated on the public schema and the schema specification before the entity ( [my_schema].[my_entity] ) is not needed anymore.
It is not the ideal solution and of course the original question remains open.
Can't .... do .... plaid .... So I did this tiny ad instead: