You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Tom Mutdosch (JIRA)" <ji...@apache.org> on 2007/10/12 16:05:50 UTC
[jira] Created: (OPENJPA-400) schema defined in the orm.xml's
persistence-unit-defaults is not honored
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
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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-400) schema defined in the orm.xml's
persistence-unit-defaults is not honored
Posted by "Stephen Coy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611435#action_12611435 ]
Stephen Coy commented on OPENJPA-400:
-------------------------------------
I have observed this issue also with DB2, in the OpenJPA implementation that ships with the IBM WebSphere 6.1 EJB3 Feature Pak.
> 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
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.