[jboss-jira] [JBoss JIRA] (WFLY-2744) JPA .schema-generation-action compliance issue
Scott Marlow (JIRA)
issues at jboss.org
Mon Jan 13 10:45:34 EST 2014
[ https://issues.jboss.org/browse/WFLY-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Marlow resolved WFLY-2744.
--------------------------------
Resolution: Rejected
When you create the Hibernate jira for this issue, include the error message that causes deployment to fail.
> JPA .schema-generation-action compliance issue
> ----------------------------------------------
>
> Key: WFLY-2744
> URL: https://issues.jboss.org/browse/WFLY-2744
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.CR1
> Environment: windows
> Reporter: Leos Literak
> Assignee: Scott Marlow
>
> I had following persistence.xml in my war application:
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="2.1"
> xmlns="http://xmlns.jcp.org/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
> <persistence-unit name="OAUTHDEMO" transaction-type="JTA">
> <jta-data-source>java:jboss/datasources/test</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
> <properties>
> <property name="javax.persistence.schema-generation.database.action" value="create"/>
> </properties>
> </persistence-unit>
> </persistence>
> When I ran it second time, deployment failed because table already existed. I downloaded JPA specification to read how it is defined and there is such statement:
> javax.persistence.schema-generation-action
> The javax.persistence.schema-generation-action property specifies the
> action to be taken by the persistence provider. If the javax.persistence.
> schema-generation-target property is not specified, no action must be
> taken, regardless of the value of the javax.persistence.schema-generation-
> action property. The values for this property are "none", "create",
> "drop-and-create", "drop".
> Following sentence is interesting, because I do not have the schema-generation-target property defined:
> If the javax.persistence.
> schema-generation-target property is not specified, no action must be
> taken, regardless of the value of the javax.persistence.schema-generation-action property.
> So unless I misunderstood this line, then JPA implementation is incorrect.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list