Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B56410AA4 for ; Mon, 3 Nov 2014 19:25:03 +0000 (UTC) Received: (qmail 10232 invoked by uid 500); 3 Nov 2014 19:25:03 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 10201 invoked by uid 500); 3 Nov 2014 19:25:03 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 10123 invoked by uid 99); 3 Nov 2014 19:25:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 19:25:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 19:24:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A9F882388993; Mon, 3 Nov 2014 19:23:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1636422 - in /openjpa/branches/2.2.1.x: openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/ openjpa-persistence-jdbc/src/test/resources/org/apache/o... Date: Mon, 03 Nov 2014 19:23:31 -0000 To: commits@openjpa.apache.org From: jgrassel@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141103192331.A9F882388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgrassel Date: Mon Nov 3 19:23:30 2014 New Revision: 1636422 URL: http://svn.apache.org/r1636422 Log: OPENJPA-1988: openjpa does not process persistence unit default Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml (with props) openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml (with props) Modified: openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java Modified: openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java?rev=1636422&r1=1636421&r2=1636422&view=diff ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java (original) +++ openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java Mon Nov 3 19:23:30 2014 @@ -234,23 +234,48 @@ public class ValueMetaDataImpl _delete = delete; } - public int getCascadePersist() { - if (_checkPUDefaultCascadePersist) { - Boolean dcpe = getRepository().getMetaDataFactory().getDefaults().isDefaultCascadePersistEnabled(); - if (dcpe != null && dcpe.equals(Boolean.TRUE)) { - _persist = CASCADE_IMMEDIATE; - } - _checkPUDefaultCascadePersist = false; - } - + public int getCascadePersist() { if (_owner.getManagement() != FieldMetaData.MANAGE_PERSISTENT) return CASCADE_NONE; - if (isDeclaredTypePC()) - return _persist; + if (isDeclaredTypePC()) { + return checkPUDefaultCascadePersist(); + } if (!isTypePC()) return CASCADE_NONE; // if only externalized type is pc, can't cascade immediate - return (_persist == CASCADE_IMMEDIATE) ? CASCADE_AUTO : _persist; + return (_persist == CASCADE_IMMEDIATE) ? CASCADE_AUTO : checkPUDefaultCascadePersist(); + } + + /** + * Check if the persistence unit default has been enabled. If so, then change + * CASCADE_NONE to CASCADE_IMMEDIATE. + * @return + */ + private int checkPUDefaultCascadePersist() { + if (_checkPUDefaultCascadePersist) { + // Apply default only to entity relationships + boolean applyDefaultCascadePersist = false; + + switch (_owner.getAssociationType()) { + case FieldMetaData.ONE_TO_ONE: + case FieldMetaData.ONE_TO_MANY: + case FieldMetaData.MANY_TO_MANY: + case FieldMetaData.MANY_TO_ONE: + applyDefaultCascadePersist = true; + default: + } + + if (applyDefaultCascadePersist) { + Boolean dcpe = getRepository().getMetaDataFactory().getDefaults().isDefaultCascadePersistEnabled(); + if (dcpe != null && dcpe.equals(Boolean.TRUE) && _persist == CASCADE_NONE) { + _persist = CASCADE_IMMEDIATE; + } + } + + _checkPUDefaultCascadePersist = false; + } + + return _persist; } public void setCascadePersist(int persist) { Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import javax.persistence.Basic; +import javax.persistence.Embeddable; + +@Embeddable +public class AnEmbeddable { + @Basic + private String eStrData; + + public AnEmbeddable() { + + } + + public String geteStrData() { + return eStrData; + } + + public void seteStrData(String eStrData) { + this.eStrData = eStrData; + } + + @Override + public String toString() { + return "AnEmbeddable [eStrData=" + eStrData + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/AnEmbeddable.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import java.util.ArrayList; +import java.util.Collection; + +import javax.persistence.Embeddable; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; + +@Embeddable +public class EmbeddableWithRelationships { + @ManyToMany + private Collection colM2M; + + @OneToMany + private Collection colO2M; + + @ManyToOne + private PUDEntityB m2o; + + @OneToOne + private PUDEntityB o2o; + + public EmbeddableWithRelationships() { + colM2M = new ArrayList(); + colO2M = new ArrayList(); + } + + public Collection getColM2M() { + return colM2M; + } + + public void setColM2M(Collection colM2M) { + this.colM2M = colM2M; + } + + public Collection getColO2M() { + return colO2M; + } + + public void setColO2M(Collection colO2M) { + this.colO2M = colO2M; + } + + public PUDEntityB getM2o() { + return m2o; + } + + public void setM2o(PUDEntityB m2o) { + this.m2o = m2o; + } + + public PUDEntityB getO2o() { + return o2o; + } + + public void setO2o(PUDEntityB o2o) { + this.o2o = o2o; + } + + @Override + public String toString() { + return "EmbeddableWithRelationships [colM2M=" + colM2M + ", colO2M=" + + colO2M + ", m2o=" + m2o + ", o2o=" + o2o + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/EmbeddableWithRelationships.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import java.util.ArrayList; +import java.util.Collection; + +import javax.persistence.Basic; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; + +@Entity +public class PUDEntityA01 { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + @Basic + private String strData; + + @ManyToMany + private Collection colM2M; + + @OneToMany + private Collection colO2M; + + @ManyToOne + private PUDEntityB m2o; + + @OneToOne + private PUDEntityB o2o; + + public PUDEntityA01() { + colM2M = new ArrayList(); + colO2M = new ArrayList(); + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getStrData() { + return strData; + } + + public void setStrData(String strData) { + this.strData = strData; + } + + public Collection getColM2M() { + return colM2M; + } + + public void setColM2M(Collection colM2M) { + this.colM2M = colM2M; + } + + public Collection getColO2M() { + return colO2M; + } + + public void setColO2M(Collection colO2M) { + this.colO2M = colO2M; + } + + public PUDEntityB getM2o() { + return m2o; + } + + public void setM2o(PUDEntityB m2o) { + this.m2o = m2o; + } + + public PUDEntityB getO2o() { + return o2o; + } + + public void setO2o(PUDEntityB o2o) { + this.o2o = o2o; + } + + @Override + public String toString() { + return "PUDEntityA01 [id=" + id + ", strData=" + strData + ", colM2M=" + + colM2M + ", colO2M=" + colO2M + ", m2o=" + m2o + ", o2o=" + o2o + + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA01.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import javax.persistence.Basic; +import javax.persistence.Embedded; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class PUDEntityA02 { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + @Basic + private String strData; + + @Embedded + private EmbeddableWithRelationships emb; + + public PUDEntityA02() { + emb = new EmbeddableWithRelationships(); + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getStrData() { + return strData; + } + + public void setStrData(String strData) { + this.strData = strData; + } + + public EmbeddableWithRelationships getEmb() { + return emb; + } + + public void setEmb(EmbeddableWithRelationships emb) { + this.emb = emb; + } + + @Override + public String toString() { + return "PUDEntityA02 [id=" + id + ", strData=" + strData + ", emb=" + + emb + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityA02.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import java.util.ArrayList; +import java.util.Collection; + +import javax.persistence.Basic; +import javax.persistence.Embedded; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; + +@Entity +public class PUDEntityAE01 { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + @Basic + private String strData; + + @ManyToMany + private Collection colM2M; + + @OneToMany + private Collection colO2M; + + @ManyToOne + private PUDEntityB m2o; + + @OneToOne + private PUDEntityB o2o; + + @Embedded + private AnEmbeddable ane; + + public PUDEntityAE01() { + colM2M = new ArrayList(); + colO2M = new ArrayList(); + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getStrData() { + return strData; + } + + public void setStrData(String strData) { + this.strData = strData; + } + + public Collection getColM2M() { + return colM2M; + } + + public void setColM2M(Collection colM2M) { + this.colM2M = colM2M; + } + + public Collection getColO2M() { + return colO2M; + } + + public void setColO2M(Collection colO2M) { + this.colO2M = colO2M; + } + + public PUDEntityB getM2o() { + return m2o; + } + + public void setM2o(PUDEntityB m2o) { + this.m2o = m2o; + } + + public PUDEntityB getO2o() { + return o2o; + } + + public void setO2o(PUDEntityB o2o) { + this.o2o = o2o; + } + + public AnEmbeddable getAne() { + return ane; + } + + public void setAne(AnEmbeddable ane) { + this.ane = ane; + } + + @Override + public String toString() { + return "PUDEntityAE01 [id=" + id + ", strData=" + strData + ", colM2M=" + + colM2M + ", colO2M=" + colO2M + ", m2o=" + m2o + ", o2o=" + o2o + + ", ane=" + ane + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityAE01.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import javax.persistence.Basic; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class PUDEntityB { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + @Basic + private String strData; + + public PUDEntityB() { + + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getStrData() { + return strData; + } + + public void setStrData(String strData) { + this.strData = strData; + } + + @Override + public String toString() { + return "PUDEntityB [id=" + id + ", strData=" + strData + "]"; + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/PUDEntityB.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,271 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import javax.persistence.EntityManager; + +import org.apache.openjpa.persistence.test.SingleEMFTestCase; + +public class TestNoPUDefaultCascadePersist extends SingleEMFTestCase { + public void setUp() throws Exception { + super.setUp(PUDEntityA01.class, PUDEntityAE01.class, PUDEntityB.class, AnEmbeddable.class, + CLEAR_TABLES); + } + + + public void testPUDefaultCascadePersistOverM2M() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColM2M().add(b); + } + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverO2M() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColO2M().add(b); + } + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverO2O() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setO2o(b); + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverM2O() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setM2o(b); + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverM2MWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColM2M().add(b); + } + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverO2MWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColO2M().add(b); + } + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverO2OWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setO2o(b); + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + + public void testPUDefaultCascadePersistOverM2OWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setM2o(b); + + em.persist(entity); + try { + em.getTransaction().commit(); + fail("No Exception thrown."); + } catch (Exception e) { + // Expected + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestNoPUDefaultCascadePersist.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java Mon Nov 3 19:23:30 2014 @@ -0,0 +1,504 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openjpa.persistence.cascade.pudefault; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.openjpa.persistence.OpenJPAPersistence; +import org.apache.openjpa.persistence.test.SingleEMFTestCase; + +public class TestPUDefaultCascadePersist extends SingleEMFTestCase { + private EntityManagerFactory emf = null; + public void setUp() throws Exception { + super.setUp(); + emf = OpenJPAPersistence. + createEntityManagerFactory("TestPUDefaultCascadePersist", + "org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml"); +// super.setUp(PUDEntityA01.class, PUDEntityB.class, +// "org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml", +// CLEAR_TABLES); + } + + public void tearDown() throws Exception { + super.tearDown(); + emf.close(); + } + + public void testPUDefaultCascadePersistOverM2M() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColM2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA01 f_entity = em.find(PUDEntityA01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getColM2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2M() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColO2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA01 f_entity = em.find(PUDEntityA01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getColO2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2O() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setO2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA01 f_entity = em.find(PUDEntityA01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getO2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverM2O() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA01(); + entity.setStrData("PUDEntityA01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setM2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA01 f_entity = em.find(PUDEntityA01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getM2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + + + public void testPUDefaultCascadePersistOverM2MWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColM2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityAE01 f_entity = em.find(PUDEntityAE01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getColM2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2MWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getColO2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityAE01 f_entity = em.find(PUDEntityAE01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getColO2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2OWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setO2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityAE01 f_entity = em.find(PUDEntityAE01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getO2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverM2OWithEmbed() { + EntityManager em = emf.createEntityManager(); + + PUDEntityAE01 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityAE01(); + entity.setStrData("PUDEntityAE01"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.setM2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityAE01 f_entity = em.find(PUDEntityAE01.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getM2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + + public void testPUDefaultCascadePersistOverM2MEmbbedRel() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA02 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA02(); + entity.setStrData("PUDEntityA02"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getEmb().getColM2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA02 f_entity = em.find(PUDEntityA02.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getEmb().getColM2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2MEmbbedRel() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA02 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA02(); + entity.setStrData("PUDEntityA02"); + + for (int i = 0; i < 10; i++) { + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getEmb().getColO2M().add(b); + } + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA02 f_entity = em.find(PUDEntityA02.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertEquals(10, f_entity.getEmb().getColO2M().size()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverO2OEmbbedRel() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA02 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA02(); + entity.setStrData("PUDEntityA02"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getEmb().setO2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA02 f_entity = em.find(PUDEntityA02.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getEmb().getO2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + public void testPUDefaultCascadePersistOverM2OEmbbedRel() { + EntityManager em = emf.createEntityManager(); + + PUDEntityA02 entity = null; + try { + em.getTransaction().begin(); + + entity = new PUDEntityA02(); + entity.setStrData("PUDEntityA02"); + + PUDEntityB b = new PUDEntityB(); + b.setStrData("B"); + entity.getEmb().setM2o(b); + + em.persist(entity); + em.getTransaction().commit(); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + + em.close(); + em = emf.createEntityManager(); + + try { + PUDEntityA02 f_entity = em.find(PUDEntityA02.class, entity.getId()); + assertNotNull(f_entity); + assertNotSame(entity, f_entity); + assertNotNull(entity.getEmb().getM2o()); + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + } + } + + +} Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cascade/pudefault/TestPUDefaultCascadePersist.java ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml Mon Nov 3 19:23:30 2014 @@ -0,0 +1,29 @@ + + + + + + + + + \ No newline at end of file Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml?rev=1636422&view=auto ============================================================================== --- openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml (added) +++ openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml Mon Nov 3 19:23:30 2014 @@ -0,0 +1,38 @@ + + + + + org/apache/openjpa/persistence/cascade/pudefault/META-INF/cascadepersistorm.xml + org.apache.openjpa.persistence.cascade.pudefault.PUDEntityA01 + org.apache.openjpa.persistence.cascade.pudefault.PUDEntityAE01 + org.apache.openjpa.persistence.cascade.pudefault.PUDEntityA02 + org.apache.openjpa.persistence.cascade.pudefault.PUDEntityB + org.apache.openjpa.persistence.cascade.pudefault.AnEmbeddable + org.apache.openjpa.persistence.cascade.pudefault.EmbeddableWithRelationships + + + + + + Propchange: openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/cascade/pudefault/META-INF/persistence.xml ------------------------------------------------------------------------------ svn:eol-style = native