[
https://issues.apache.org/jira/browse/OPENJPA-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-400.
-------------------------------------
Resolution: Fixed
Already fixed on master: Fixed by OPENJPA-2494 (077ad2b44, on master, not
reverted, with TestSchemaPUDefault): XMLPersistenceMappingParser.java:275-277
records the default schema, and MappingInfo.java:513-514 uses it. Closing;
please reopen if this still happens with OpenJPA 4.x.
> schema defined in the orm.xml's persistence-unit-defaults is not honored
> ------------------------------------------------------------------------
>
> Key: OPENJPA-400
> URL: https://issues.apache.org/jira/browse/OPENJPA-400
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Reporter: Tom Mutdosch
> Priority: Major
>
> I have a number of entities that were generated from a connection using a
> non-default schema. I am trying to specify the default schema to use for all
> of my entities (these entities are Java-annotated classes).
> In my orm.xml I specified:
> <persistence-unit-metadata>
> <persistence-unit-defaults>
> <schema>ADMINISTRATOR</schema>
> </persistence-unit-defaults>
> </persistence-unit-metadata>
> As per the spec, it seems that all of my entities should use this defined
> schema, unless they override it. However, this does not seem to have any
> effect and at runtime, queries are generated that are still trying to use the
> default schema (the username).
> If I instead use the openjpa property to set the schema in my persistence.xml:
> <properties>
> <property name="openjpa.jdbc.Schema"
> value="ADMINISTRATOR"/>
> </properties>
> This works fine. But it is not very portable, which is why I was trying to
> do this in the orm.xml.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)