From commitsjmurphy@example.com Mon Feb 01 18:28:44 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 48597 invoked from network); 1 Feb 2010 18:28:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Feb 2010 18:28:44 -0000 Received: (qmail 4873 invoked by uid 500); 1 Feb 2010 18:28:44 -0000 Delivered-To: jmurphy@example.com Received: (qmail 4835 invoked by uid 500); 1 Feb 2010 18:28:44 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 4826 invoked by uid 99); 1 Feb 2010 18:28:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 18:28:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2010 18:28:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8B0AD23889F7; Mon, 1 Feb 2010 18:28:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905355 - in /openjpa/trunk: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ Date: Mon, 01 Feb 2010 18:28:20 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: ppoddar Date: Mon Feb 1 18:28:18 2010 New Revision: 905355 URL: http://svn.apache.org/viewvc?rev=905355&view=rev Log: OPENJPA-960: Block unwrap for Object.class or null argument Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestUnwrap.java openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestUnwrap.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestUnwrap.java?rev=905355&r1=905354&r2=905355&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestUnwrap.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/TestUnwrap.java Mon Feb 1 18:28:18 2010 @@ -18,7 +18,10 @@ */ package org.apache.openjpa.persistence; +import java.util.Properties; + import javax.persistence.EntityManager; +import javax.persistence.EntityTransaction; import javax.persistence.Query; import org.apache.openjpa.kernel.QueryLanguages; @@ -54,15 +57,42 @@ public void testValidEntityManagerUnwrap() { EntityManager em = emf.createEntityManager(); - Class[] validCasts = new Class[] { + Class<?>[] validCasts = new Class[] { org.apache.openjpa.persistence.OpenJPAEntityManager.class, org.apache.openjpa.persistence.OpenJPAEntityManagerSPI.class, org.apache.openjpa.kernel.DelegatingBroker.class, org.apache.openjpa.kernel.Broker.class }; - for (Class c : validCasts) { + for (Class<?> c : validCasts) { Object unwrapped = em.unwrap(c); assertTrue(c.isInstance(unwrapped)); } } + + /** + * Tests a EntityManager can be unwrapped as an instance of a series of + * class or interface. + */ + public void testInvalidEntityManagerUnwrap() { + EntityManager em = emf.createEntityManager(); + + Class<?>[] validCasts = new Class[] { + Object.class, + Properties.class, + null, + }; + for (Class<?> c : validCasts) { + try { + em.unwrap(c); + fail("Expected to fail to unwarp with " + c); + } catch (PersistenceException e) { + EntityTransaction txn = em.getTransaction(); + assertFalse(txn.isActive()); + } catch (Exception ex) { + ex.printStackTrace(); + fail("Unexpected exception while unwrapping " + c); + } + } + } + } Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=905355&r1=905354&r2=905355&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Mon Feb 1 18:28:18 2010 @@ -1605,6 +1605,10 @@ public <T> T unwrap(Class<T> cls) { Object[] delegates = new Object[]{_broker.getInnermostDelegate(), _broker.getDelegate(), _broker, this}; + if (cls == null || cls == Object.class) { + throw new PersistenceException(_loc.get("unwrap-em-invalid", cls) + .toString(), null, this, false); + } for (Object o : delegates) { if (cls.isInstance(o)) return (T)o; Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java?rev=905355&r1=905354&r2=905355&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java (original) +++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java Mon Feb 1 18:28:18 2010 @@ -473,6 +473,10 @@ public <T> T unwrap(Class<T> cls) { Object[] delegates = new Object[]{_query.getInnermostDelegate(), _query.getDelegate(), _query, this}; + if (cls == null || cls == Object.class) { + throw new PersistenceException(_loc.get("unwrap-em-invalid", cls) + .toString(), null, this, false); + } for (Object o : delegates) { if (cls.isInstance(o)) return (T)o; From commitsjmurphy@example.com Tue Feb 02 07:58:54 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 24672 invoked from network); 2 Feb 2010 07:58:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 07:58:54 -0000 Received: (qmail 37768 invoked by uid 500); 2 Feb 2010 07:58:54 -0000 Delivered-To: jmurphy@example.com Received: (qmail 37701 invoked by uid 500); 2 Feb 2010 07:58:54 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 37692 invoked by uid 99); 2 Feb 2010 07:58:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 07:58:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 07:58:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 82B4D23889E5; Tue, 2 Feb 2010 07:58:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905540 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/ openjpa-persistence-jd... Date: Tue, 02 Feb 2010 07:58:31 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> Author: faywang Date: Tue Feb 2 07:58:31 2010 New Revision: 905540 URL: http://svn.apache.org/viewvc?rev=905540&view=rev Log: OPENJPA-1483: support count distinct compound key Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Count.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Distinct.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/UnaryOp.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/localizer.properties openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Count.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Count.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Count.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Count.java Tue Feb 2 07:58:31 2010 @@ -18,6 +18,7 @@ */ package org.apache.openjpa.jdbc.kernel.exps; +import org.apache.openjpa.jdbc.schema.Column; import org.apache.openjpa.jdbc.sql.SQLBuffer; import org.apache.openjpa.jdbc.sql.Select; @@ -29,16 +30,30 @@ class Count extends UnaryOp { + private boolean isCountMultiColumns = false; + private boolean isCountDistinct = false; + /** * Constructor. Provide the value to operate on. */ public Count(Val val) { super(val); + if (val instanceof Distinct) + isCountDistinct = true; } public ExpState initialize(Select sel, ExpContext ctx, int flags) { // join into related object if present - return initializeValue(sel, ctx, JOIN_REL); + ExpState expState = initializeValue(sel, ctx, JOIN_REL); + Val val = isCountDistinct ? ((Distinct)getValue()).getValue() : getValue(); + if (val instanceof PCPath) { + Column[] cols = ((PCPath)val).getColumns(expState); + if (cols.length > 1) { + isCountMultiColumns = true; + } + } + + return expState; } protected Class getType(Class c) { @@ -52,15 +67,24 @@ public boolean isAggregate() { return true; } - + + public boolean isCountDistinctMultiCols() { + return isCountDistinct && isCountMultiColumns; + } + /** * Overrides SQL formation by replacing COUNT(column) by COUNT(*) when specific conditions are met and * DBDictionary configuration <code>useWildCardForCount</code> is set. */ @Override public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { - super.appendTo(sel, ctx, state, sql, index); - if (ctx.store.getDBDictionary().useWildCardForCount && state.joins.isEmpty()) { + if (isCountDistinctMultiCols()) { + getValue().appendTo(sel, ctx, state, sql, 0); + sql.addCastForParam(getOperator(), getValue()); + } else + super.appendTo(sel, ctx, state, sql, index); + if ((ctx.store.getDBDictionary().useWildCardForCount && state.joins.isEmpty()) || + !isCountDistinct && isCountMultiColumns){ String s = sql.getSQL(); if (s.startsWith("COUNT(") && s.endsWith(")")) { sql.replaceSqlString("COUNT(".length(), s.length()-1, "*"); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Distinct.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Distinct.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Distinct.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Distinct.java Tue Feb 2 07:58:31 2010 @@ -41,4 +41,22 @@ protected String getOperator() { return "DISTINCT"; } + + @Override + public void appendTo(Select sel, ExpContext ctx, ExpState state, + SQLBuffer sql, int index) { + Val val = getValue(); + if (val instanceof PCPath) { + boolean noParen = getNoParen(); + sql.append(getOperator()); + sql.append(noParen ? " " : "("); + ((PCPath)val).appendTo(sel, ctx, state, sql); + sql.addCastForParam(getOperator(), val); + if (!noParen) + sql.append(")"); + + } else + super.appendTo(sel, ctx, state, sql, index); + } + } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java Tue Feb 2 07:58:31 2010 @@ -971,8 +971,22 @@ } public void appendTo(Select sel, ExpContext ctx, ExpState state, + SQLBuffer sql) { + Column[] cols = getColumns(state); + for (int i = 0; i < cols.length; i++) { + appendTo(sel, state, sql, cols[i]); + if (i < cols.length -1) + sql.append(", "); + } + } + + public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { Column col = getColumns(state)[index]; + appendTo(sel, state, sql, col); + } + + public void appendTo(Select sel, ExpState state, SQLBuffer sql, Column col) { if (sel != null) sel.setSchemaAlias(_schemaAlias); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java Tue Feb 2 07:58:31 2010 @@ -36,6 +36,8 @@ import org.apache.openjpa.kernel.exps.QueryExpressions; import org.apache.openjpa.kernel.exps.Subquery; import org.apache.openjpa.kernel.exps.Value; +import org.apache.openjpa.lib.util.Localizer; +import org.apache.openjpa.util.UnsupportedException; /** * Turns parsed queries into selects. @@ -48,6 +50,7 @@ private boolean _extent = false; private Select _subselect = null; + private static final Localizer _loc = Localizer.forPackage(SelectConstructor.class); /** * Return true if we know the select to have on criteria; to be an extent. @@ -115,6 +118,18 @@ } for (int i = 0; i < exps.grouping.length; i++) ((Val) exps.grouping[i]).groupBy(sel, ctx, state.grouping[i]); + + if (exps.projections.length == 1) { + Val val = (Val) exps.projections[0]; + if (val instanceof Count && ((Count)val).isCountDistinctMultiCols()) { + Select newSel = ctx.store.getSQLFactory().newSelect(); + newSel.select("COUNT(*)", val); + newSel.setExpectedResultCount(1, true); + newSel.setFromSelect(sel); + sel.setExpectedResultCount(0, true); + sel = newSel; + } + } return sel; } @@ -235,6 +250,10 @@ // projections; this ensures that we have all our joins cached state.projections[i] = resultVal.initialize(sel, ctx, Val.JOIN_REL | Val.FORCE_OUTER); + if (exps.projections.length > 1 && resultVal instanceof Count) { + if (((Count)resultVal).isCountDistinctMultiCols()) + throw new UnsupportedException(_loc.get("count-distinct-multi-col-only")); + } joins = sel.and(joins, state.projections[i].joins); } } @@ -290,6 +309,8 @@ Select inner = sel.getFromSelect(); Val val; Joins joins = null; + boolean isCountDistinctMultiCols = false; + if (sel.getSubselectPath() != null) joins = sel.newJoins().setSubselect(sel.getSubselectPath()); @@ -307,9 +328,18 @@ // subselect for objects; we really just need the primary key values sel.select(mapping.getPrimaryKeyColumns(), joins); } else { + if (exps.projections.length == 1) { + val = (Val) exps.projections[0]; + if (val instanceof Count && ((Count)val).isCountDistinctMultiCols()) { + isCountDistinctMultiCols = true; + if (sel.getParent() != null) + throw new UnsupportedException(_loc.get("count-distinct-multi-col-subselect-unsupported")); + } + } + // if we have an inner select, we need to select the candidate // class' pk columns to guarantee unique instances - if (inner != null) + if (inner != null && !isCountDistinctMultiCols) inner.select(mapping.getPrimaryKeyColumns(), joins); // select each result value; no need to pass on the eager mode since @@ -317,9 +347,13 @@ boolean pks = sel.getParent() != null; for (int i = 0; i < exps.projections.length; i++) { val = (Val) exps.projections[i]; - if (inner != null) - val.selectColumns(inner, ctx, state.projections[i], pks); - val.select(sel, ctx, state.projections[i], pks); + if (inner != null) { + if (!isCountDistinctMultiCols) + val.selectColumns(inner, ctx, state.projections[i], pks); + else + val.select(inner, ctx, state.projections[i], pks); + } else + val.select(sel, ctx, state.projections[i], pks); } // make sure having columns are selected since it is required by Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/UnaryOp.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/UnaryOp.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/UnaryOp.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/UnaryOp.java Tue Feb 2 07:58:31 2010 @@ -74,6 +74,10 @@ public void setImplicitType(Class type) { _cast = type; } + + public boolean getNoParen() { + return _noParen; + } public ExpState initialize(Select sel, ExpContext ctx, int flags) { return initializeValue(sel, ctx, flags); Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Tue Feb 2 07:58:31 2010 @@ -3111,9 +3111,10 @@ alias = alias + _dict.getStringVal; String as = null; - if (inner) - as = ((String) alias).replace('.', '_'); - else if (_selectAs != null) + if (inner) { + if (alias instanceof String) + as = ((String) alias).replace('.', '_'); + } else if (_selectAs != null) as = (String) _selectAs.get(id); else if (id instanceof Value) as = ((Value) id).getAlias(); Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/localizer.properties?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/localizer.properties (original) +++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/exps/localizer.properties Tue Feb 2 07:58:31 2010 @@ -30,4 +30,8 @@ no-order-column: Field "{0}" does not have order column defined". not-collection-parm: Invalid input parameter "{0}", a collection-valued \ input parameter is expected. -empty-collection-parm: Input parameter "{0}" is empty. \ No newline at end of file +empty-collection-parm: Input parameter "{0}" is empty. +count-distinct-multi-col-only: Count distinct compound primary key is not \ + supported when there are other projection items. +count-distinct-multi-col-subselect-unsupported: Count distinct multiple columns \ + in the subselect is not supported. \ No newline at end of file Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java?rev=905540&r1=905539&r2=905540&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/identity/TestMappedById.java Tue Feb 2 07:58:31 2010 @@ -206,6 +206,55 @@ assertNotNull(newDep); } + public void testCountDistinctMultiCols() { + EntityManager em = emf.createEntityManager(); + + Employee2 emp1 = new Employee2(); + EmployeeId2 empId1 = new EmployeeId2(); + empId1.setFirstName("James"); + empId1.setLastName("Bond"); + emp1.setEmpId(empId1); + + Employee2 emp2 = new Employee2(); + EmployeeId2 empId2 = new EmployeeId2(); + empId2.setFirstName("James"); + empId2.setLastName("Obama"); + emp2.setEmpId(empId2); + + Dependent2 dep1 = new Dependent2(); + DependentId2 depId1 = new DependentId2(); + depId1.setEmpPK(empId1); + depId1.setName("Alan"); + dep1.setId(depId1); + + Dependent2 dep2 = new Dependent2(); + DependentId2 depId2 = new DependentId2(); + depId2.setEmpPK(empId2); + depId2.setName("Darren"); + dep2.setId(depId2); + + em.persist(emp1); + em.persist(emp2); + em.persist(dep1); + em.persist(dep2); + + em.getTransaction().begin(); + em.flush(); + em.getTransaction().commit(); + + String[] jpqls = { + "SELECT COUNT (DISTINCT d2.emp) FROM Dependent2 d2", + "select count (DISTINCT d2) from Dependent2 d2", + }; + + for (int i = 0; i < jpqls.length; i++) { + Query q = em.createQuery(jpqls[i]) ; + Long o = (Long)q.getSingleResult(); + int count = (int)o.longValue(); + assertEquals(2, count); + } + } + public void createObj1() { EntityManager em = emf.createEntityManager(); EntityTransaction tran = em.getTransaction(); From commitsjmurphy@example.com Tue Feb 02 14:44:16 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 80640 invoked from network); 2 Feb 2010 14:44:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 14:44:16 -0000 Received: (qmail 8757 invoked by uid 500); 2 Feb 2010 14:44:16 -0000 Delivered-To: jmurphy@example.com Received: (qmail 8711 invoked by uid 500); 2 Feb 2010 14:44:15 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 8702 invoked by uid 99); 2 Feb 2010 14:44:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 14:44:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 14:44:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2CB7F23888EC; Tue, 2 Feb 2010 14:43:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905651 - /openjpa/branches/1.3.x/NOTICE.txt Date: Tue, 02 Feb 2010 14:43:51 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: dwoods Date: Tue Feb 2 14:43:50 2010 New Revision: 905651 URL: http://svn.apache.org/viewvc?rev=905651&view=rev Log: include ASF copyright Modified: openjpa/branches/1.3.x/NOTICE.txt Modified: openjpa/branches/1.3.x/NOTICE.txt URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/NOTICE.txt?rev=905651&r1=905650&r2=905651&view=diff ============================================================================== --- openjpa/branches/1.3.x/NOTICE.txt (original) +++ openjpa/branches/1.3.x/NOTICE.txt Tue Feb 2 14:43:50 2010 @@ -1,14 +1,18 @@ - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - == in this case for the Apache OpenJPA distribution. == - ========================================================================= +========================================================================= +== NOTICE file corresponding to section 4(d) of the Apache License, == +== Version 2.0, in this case for the Apache OpenJPA distribution. == +========================================================================= - This product includes software developed by - The Apache Software Foundation (http://www.apache.org/). +Apache OpenJPA +Copyright 2006-2010 The Apache Software Foundation +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + + +The following copyright notice(s) were affixed to portions of this code +with which this file is now or was at one time distributed. -COPYRIGHT NOTICES OpenJPA includes software developed by the SERP project Copyright (c) 2002-2006, A. Abram White. All rights reserved. @@ -25,3 +29,4 @@ OpenJPA includes software written by Miroslav Nachev OpenJPA uses test code written by Charles Tillman. + From commitsjmurphy@example.com Tue Feb 02 14:47:33 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 82065 invoked from network); 2 Feb 2010 14:47:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 14:47:33 -0000 Received: (qmail 13298 invoked by uid 500); 2 Feb 2010 14:47:33 -0000 Delivered-To: jmurphy@example.com Received: (qmail 13236 invoked by uid 500); 2 Feb 2010 14:47:33 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 13227 invoked by uid 99); 2 Feb 2010 14:47:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 14:47:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 14:47:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8C3DA23888EC; Tue, 2 Feb 2010 14:47:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905653 - in /openjpa/trunk: NOTICE.txt openjpa-project/NOTICE.txt Date: Tue, 02 Feb 2010 14:47:12 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> Author: dwoods Date: Tue Feb 2 14:47:11 2010 New Revision: 905653 URL: http://svn.apache.org/viewvc?rev=905653&view=rev Log: minor notice file updates Modified: openjpa/trunk/NOTICE.txt openjpa/trunk/openjpa-project/NOTICE.txt Modified: openjpa/trunk/NOTICE.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/NOTICE.txt?rev=905653&r1=905652&r2=905653&view=diff ============================================================================== --- openjpa/trunk/NOTICE.txt (original) +++ openjpa/trunk/NOTICE.txt Tue Feb 2 14:47:11 2010 @@ -1,14 +1,16 @@ -Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation. - Apache OpenJPA -Copyright 2006,2010 The Apache Software Foundation +Copyright 2006-2010 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). +Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation. + + +The following copyright notice(s) were affixed to portions of this code +with which this file is now or was at one time distributed. -COPYRIGHT NOTICES OpenJPA includes software developed by the SERP project Copyright (c) 2002-2006, A. Abram White. All rights reserved. Modified: openjpa/trunk/openjpa-project/NOTICE.txt URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/NOTICE.txt?rev=905653&r1=905652&r2=905653&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/NOTICE.txt (original) +++ openjpa/trunk/openjpa-project/NOTICE.txt Tue Feb 2 14:47:11 2010 @@ -1,12 +1,12 @@ -Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation. - Apache OpenJPA Aggregate Jar with Dependencies -Copyright 2006,2010 The Apache Software Foundation +Copyright 2006-2010 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). +Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation. + The OpenJPA binary assembly includes software developed by the: Apache Commons Collections project Apache Commons Lang project @@ -15,6 +15,11 @@ Apache Geronimo project (JMS 1.1, JTA 1.1 and JPA 2.0 spec apis) SERP project + +The following copyright notice(s) were affixed to portions of this code +with which this file is now or was at one time distributed. + + OpenJPA includes software developed by the SERP project Copyright (c) 2002-2006, A. Abram White. All rights reserved. From commitsjmurphy@example.com Tue Feb 02 21:56:35 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 85432 invoked from network); 2 Feb 2010 21:56:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 21:56:35 -0000 Received: (qmail 2866 invoked by uid 500); 2 Feb 2010 21:56:34 -0000 Delivered-To: jmurphy@example.com Received: (qmail 2830 invoked by uid 500); 2 Feb 2010 21:56:34 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 2821 invoked by uid 99); 2 Feb 2010 21:56:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 21:56:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 21:56:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3854523889E2; Tue, 2 Feb 2010 21:56:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905808 - in /openjpa/branches/1.2.x: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Date: Tue, 02 Feb 2010 21:56:11 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikedd Date: Tue Feb 2 21:56:10 2010 New Revision: 905808 URL: http://svn.apache.org/viewvc?rev=905808&view=rev Log: OPENJPA-1482: Prevent NoSuchMethodError when calling setVersion. Submitted By : Rick Curtis Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=905808&r1=905807&r2=905808&view=diff ============================================================================== --- openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original) +++ openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Tue Feb 2 21:56:10 2010 @@ -3661,7 +3661,8 @@ v.setTransient(true); loadManagedInstance(code, true); code.constant().setValue(1); - addSetManagedValueCode(code, v); + // pcVersionInit = true; + putfield(code, null, v.getName(), v.getDeclaredType()); } code.vreturn(); Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java?rev=905808&r1=905807&r2=905808&view=diff ============================================================================== --- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java (original) +++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Tue Feb 2 21:56:10 2010 @@ -75,6 +75,14 @@ } + /** + * This testcase was added for OPENJPA-1482. + */ + public void testSetVersionPropertyAccess() { + NoDetachedStateEntityPropertyAccess entity = new NoDetachedStateEntityPropertyAccess(); + entity.setVersion(1); + } + void loadDB() { OpenJPAEntityManagerSPI em = emf.createEntityManager(); em.getTransaction().begin(); From commitsjmurphy@example.com Tue Feb 02 23:24:21 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 29695 invoked from network); 2 Feb 2010 23:24:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 23:24:21 -0000 Received: (qmail 108 invoked by uid 500); 2 Feb 2010 23:24:21 -0000 Delivered-To: jmurphy@example.com Received: (qmail 99987 invoked by uid 500); 2 Feb 2010 23:24:21 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 99978 invoked by uid 99); 2 Feb 2010 23:24:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 23:24:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 23:24:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CF2A7238897D; Tue, 2 Feb 2010 23:23:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905835 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Date: Tue, 02 Feb 2010 23:23:57 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikedd Date: Tue Feb 2 23:23:57 2010 New Revision: 905835 URL: http://svn.apache.org/viewvc?rev=905835&view=rev Log: OPENJPA-1482: Prevent NoSuchMethodError when calling setVersion. Submitted By : Rick Curtis Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=905835&r1=905834&r2=905835&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original) +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Tue Feb 2 23:23:57 2010 @@ -3714,7 +3714,8 @@ v.setTransient(true); loadManagedInstance(code, true); code.constant().setValue(1); - addSetManagedValueCode(code, v); + // pcVersionInit = true; + putfield(code, null, v.getName(), v.getDeclaredType()); } code.vreturn(); Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java?rev=905835&r1=905834&r2=905835&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/detachment/TestDetachNoStateField.java Tue Feb 2 23:23:57 2010 @@ -75,6 +75,14 @@ } + /** + * This testcase was added for OPENJPA-1482. + */ + public void testSetVersionPropertyAccess() { + NoDetachedStateEntityPropertyAccess entity = new NoDetachedStateEntityPropertyAccess(); + entity.setVersion(1); + } + void loadDB() { OpenJPAEntityManagerSPI em = emf.createEntityManager(); em.getTransaction().begin(); From commitsjmurphy@example.com Tue Feb 02 23:53:24 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 36222 invoked from network); 2 Feb 2010 23:53:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Feb 2010 23:53:24 -0000 Received: (qmail 47090 invoked by uid 500); 2 Feb 2010 23:53:24 -0000 Delivered-To: jmurphy@example.com Received: (qmail 47053 invoked by uid 500); 2 Feb 2010 23:53:24 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 47044 invoked by uid 99); 2 Feb 2010 23:53:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 23:53:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 23:53:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 477BC238897D; Tue, 2 Feb 2010 23:52:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905842 - in /openjpa/branches/1.0.x: ./ openjpa-kernel/src/main/java/org/apache/openjpa/datacache/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ Date: Tue, 02 Feb 2010 23:52:59 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikedd Date: Tue Feb 2 23:52:58 2010 New Revision: 905842 URL: http://svn.apache.org/viewvc?rev=905842&view=rev Log: OPENJPA-1328: Check cacheability in ClassMetaData instead of AbstractDataCache. Based on patch for 1.2.x by Jody Grassel Modified: openjpa/branches/1.0.x/ (props changed) openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java Propchange: openjpa/branches/1.0.x/ ------------------------------------------------------------------------------ svn:mergeinfo = /openjpa/branches/1.2.x:821449 Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java?rev=905842&r1=905841&r2=905842&view=diff ============================================================================== --- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java (original) +++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractDataCache.java Tue Feb 2 23:52:58 2010 @@ -489,42 +489,4 @@ StringUtils.isEmpty(types) ? null : new HashSet(Arrays .asList(Strings.split(types, ";", 0))); } - - /** - * Determine whether a provided class can be applied to this cache. - * - * <P> - * The algorithm used to determine which types apply is as follows: - * <UL> - * <LI>If neither included nor excluded types are found all types will be - * used.</LI> - * <LI>If included types are specified and excluded types are not specified - * <b>only</b> the included types will be used.</LI> - * <LI>If included types are not specified and excluded types are specified - * all types will be used <b>except</b> those which are explicitly excluded. - * </LI> - * <LI>If both included types and excluded types are specified then - * <b>only</b> the included types will be used. If an included type is also - * an excluded type the <b>excluded</b> setting will take precedence (ie - * the type will not be used).</LI> - * </UL> - * - * @param className - * A class which may be used by this plugin. - * @return True if the type should be used, otherwise false. - */ - public boolean isCacheableType(String classname) { - boolean rval = true; - if (_includedTypes != null && ! _includedTypes.isEmpty()) { - if(!_includedTypes.contains(classname)) { - rval = false; - } - } - if (_excludedTypes != null && ! _excludedTypes.isEmpty()) { - if(_excludedTypes.contains(classname)) { - rval = false; - } - } - return rval; - } } Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=905842&r1=905841&r2=905842&view=diff ============================================================================== --- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java (original) +++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Tue Feb 2 23:52:58 2010 @@ -37,7 +37,6 @@ import org.apache.commons.lang.StringUtils; import org.apache.openjpa.conf.OpenJPAConfiguration; -import org.apache.openjpa.datacache.AbstractDataCache; import org.apache.openjpa.datacache.DataCache; import org.apache.openjpa.enhance.PCRegistry; import org.apache.openjpa.enhance.Reflection; @@ -46,6 +45,7 @@ import org.apache.openjpa.lib.meta.SourceTracker; import org.apache.openjpa.lib.util.J2DoPrivHelper; import org.apache.openjpa.lib.util.Localizer; +import org.apache.openjpa.lib.util.Options; import org.apache.openjpa.lib.xml.Commentable; import org.apache.openjpa.util.BigDecimalId; import org.apache.openjpa.util.BigIntegerId; @@ -67,6 +67,8 @@ import org.apache.openjpa.util.ImplHelper; import serp.util.Strings; +import org.apache.openjpa.lib.conf.Configurations; + /** * Contains metadata about a persistent type. * This metadata is available both at enhancement time and runtime. @@ -190,6 +192,8 @@ private FetchGroup[] _customFGs = null; private boolean _intercepting = false; + private Boolean _isCacheable = null; + /** * Constructor. Supply described type and repository. */ @@ -1342,7 +1346,7 @@ else { _cacheName = DataCache.NAME_DEFAULT; } - if(!isCacheable(_cacheName)) { + if(!isCacheable()) { _cacheName = null; } } @@ -2363,16 +2367,93 @@ * * @return true if the DataCache will accept this type, otherwise false. */ - private boolean isCacheable(String candidateCacheName) { - boolean rval = true; - DataCache cache = - getRepository().getConfiguration().getDataCacheManagerInstance() - .getDataCache(candidateCacheName); - if (cache != null && (cache instanceof AbstractDataCache)) { - AbstractDataCache adc = (AbstractDataCache) cache; - if (!adc.isCacheableType(getDescribedType().getName())) - rval = false; + private boolean isCacheable() { + if (_isCacheable != null) { + return _isCacheable.booleanValue(); } - return rval; + setIsCacheable(true, false); + return _isCacheable.booleanValue(); + } + + /** + * <p> + * Set whether or not the class represented by this ClassMetaData object should be included in the datacache. The + * arguments provided are *hints* as to whether the class should be included in the datacache, and can be overridden + * by the configuration set in openjpa.Datacache. + * </p> + * + * <p> + * Rules for this determination are: + * </p> + * <ol> + * <li>If the class shows up in the list of excluded types, it does not get cached, period.</li> + * <li>If the class does not show up in the excluded types, but the included types field is set (ie, has at least + * one class), then: + * <ol> + * <li>If the class is listed in the include list, then it gets cached</li> + * <li>If the class is set as cacheable by the @Datacache annotation, it gets cached</li> + * <li>If neither a or b are true, then the class does not get cached</li> + * </ol> + * </li> + * <li>If neither the include or exclude lists are defined, then go along with the value passed into the argument, + * which is either the default value (true) or whatever was set with the @Datacache annotation</li> + * </ol> + * + * @param isCacheable + * Hint whether this class should be included in the datacache. Default behavior is yes, though the + * @Datacache annotation can specify if it should not be cached. + * @param annotationOverride + * Whether this hint originated from the @Datacache annotation or whether this is the default "yes" hint. + * The origination of the hint influences the decision making process in rule #2b. + * + */ + public void setIsCacheable(boolean isCacheable, boolean annotationOverride) { + Options dataCacheOptions = getDataCacheOptions(); + Set excludedTypes = extractDataCacheClassListing(dataCacheOptions.getProperty("ExcludedTypes", null)); + Set types = extractDataCacheClassListing(dataCacheOptions.getProperty("Types", null)); + + String className = getDescribedType().getName(); + if (excludedTypes != null && excludedTypes.contains(className)) { + // Rule #1 + _isCacheable = Boolean.FALSE; + } else if (types != null) { + // Rule #2 + if ((annotationOverride && isCacheable) || (types.contains(className))) { + _isCacheable = Boolean.TRUE; + } else { + _isCacheable = Boolean.FALSE; + } + } else { + // Rule #3 + _isCacheable = isCacheable ? Boolean.TRUE : Boolean.FALSE; + } + } + + /** + * Extract all of the DataCache plugin options from the configuration + * + */ + private Options getDataCacheOptions() { + String dataCacheConfig = getRepository().getConfiguration().getDataCache(); + Options dataCacheOptions = Configurations.parseProperties(Configurations.getProperties(dataCacheConfig)); + return dataCacheOptions; + } + + /** + * Tool to extract classes defined in the datacache include and exclude list into + * individual entries in a Set. + * + */ + private final Set extractDataCacheClassListing(String classList) { + if (classList == null || classList.length() == 0) { + return null; + } + + HashSet returnSet = new HashSet(); + String[] entries = classList.split(";"); + for (int index = 0; index < entries.length; index++) { + returnSet.add(entries[index]); + } + return returnSet; } } Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=905842&r1=905841&r2=905842&view=diff ============================================================================== --- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java (original) +++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java Tue Feb 2 23:52:58 2010 @@ -748,6 +748,8 @@ org.apache.openjpa.datacache.DataCache.NAME_DEFAULT); else meta.setDataCacheName(null); + + meta.setIsCacheable(cache.enabled(), true); } /** From commitsjmurphy@example.com Wed Feb 03 05:27:21 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 38346 invoked from network); 3 Feb 2010 05:27:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Feb 2010 05:27:21 -0000 Received: (qmail 82892 invoked by uid 500); 3 Feb 2010 05:27:21 -0000 Delivered-To: jmurphy@example.com Received: (qmail 82826 invoked by uid 500); 3 Feb 2010 05:27:21 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 82816 invoked by uid 99); 3 Feb 2010 05:27:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 05:27:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 05:27:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A2CA62388993; Wed, 3 Feb 2010 05:26:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r905898 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java Date: Wed, 03 Feb 2010 05:26:59 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> Author: fancy Date: Wed Feb 3 05:26:58 2010 New Revision: 905898 URL: http://svn.apache.org/viewvc?rev=905898&view=rev Log: OPENJPA-1493: Performance improvement in SelectImpl.getTableIndex() for JPQL without subselect The JUnit regression uncovers an issue in Criteria Query add @AllowFailure in TestTypesafeCriteria.testValues5(), it is found the expected sql is incorrect. A separate issue will address this problem. Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=905898&r1=905897&r2=905898&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Wed Feb 3 05:26:58 2010 @@ -1990,7 +1990,7 @@ if (pj != null && pj.path() != null) key = new Key(pj.path().toString(), key); - if (_ctx != null) + if (_ctx != null && (_parent != null || _subsels != null)) i = findAliasForQuery(table, pj, key, create); if (i != null) Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java?rev=905898&r1=905897&r2=905898&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java Wed Feb 3 05:26:58 2010 @@ -1161,6 +1161,7 @@ executeAndCompareSQL(q, sql); } + @AllowFailure(message="The expected sql string is incorrect") public void testValues5() { String sql = "SELECT t0.name, t2.id, t2.label FROM CR_ITEM t0 " + "INNER JOIN CR_ITEM_photos t1 ON t0.id = t1.ITEM_ID " From commitsjmurphy@example.com Thu Feb 04 19:38:52 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 56448 invoked from network); 4 Feb 2010 19:38:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Feb 2010 19:38:52 -0000 Received: (qmail 3666 invoked by uid 500); 4 Feb 2010 19:38:52 -0000 Delivered-To: jmurphy@example.com Received: (qmail 3599 invoked by uid 500); 4 Feb 2010 19:38:52 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 3590 invoked by uid 99); 4 Feb 2010 19:38:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 19:38:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 19:38:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8FBF52388A2D; Thu, 4 Feb 2010 19:38:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r906614 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/ Date: Thu, 04 Feb 2010 19:38:28 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: faywang Date: Thu Feb 4 19:38:27 2010 New Revision: 906614 URL: http://svn.apache.org/viewvc?rev=906614&view=rev Log: OPENJPA-1493: performance fix in getTableIndex Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java?rev=906614&r1=906613&r2=906614&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/SelectConstructor.java Thu Feb 4 19:38:27 2010 @@ -166,7 +166,9 @@ subsel.setParent(sel, subquery.getCandidateAlias()); } } - + if (HasContainsExpressionVisitor.hasContains(exps.filter)) { + sel.setHasSubselect(true); + } initialize(sel, ctx, exps, state); if (!sel.getAutoDistinct()) { Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java?rev=906614&r1=906613&r2=906614&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/LogicalUnion.java Thu Feb 4 19:38:27 2010 @@ -443,6 +443,14 @@ throw new UnsupportedException(_loc.get("union-element")); } + public void setHasSubselect(boolean hasSub) { + sel.setHasSubselect(hasSub); + } + + public boolean getHasSubselect() { + return sel.getHasSubselect(); + } + public Select getFromSelect() { return null; } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java?rev=906614&r1=906613&r2=906614&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Select.java Thu Feb 4 19:38:27 2010 @@ -719,4 +719,18 @@ * @param schemaAlias */ public void setSchemaAlias(String schemaAlias); + + /** + * Set the flag to indicate whether this Select has + * internally generated subselect + */ + public void setHasSubselect(boolean hasSub); + + /** + * Return the flag to indicate whether this Select has + * internally generated subselect + * @return + */ + public boolean getHasSubselect(); + } Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?rev=906614&r1=906613&r2=906614&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java (original) +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java Thu Feb 4 19:38:27 2010 @@ -158,6 +158,7 @@ private List _subsels = null; private SelectImpl _parent = null; private String _subPath = null; + private boolean _hasSub = false; // from select if this select selects from a tmp table created by another private SelectImpl _from = null; @@ -559,6 +560,14 @@ } } + public void setHasSubselect(boolean hasSub) { + _hasSub = hasSub; + } + + public boolean getHasSubselect() { + return _hasSub; + } + public Map getAliases() { return _aliases; } @@ -1990,8 +1999,9 @@ if (pj != null && pj.path() != null) key = new Key(pj.path().toString(), key); - if (_ctx != null && (_parent != null || _subsels != null)) + if (_ctx != null && (_parent != null || _subsels != null || _hasSub)) { i = findAliasForQuery(table, pj, key, create); + } if (i != null) return i.intValue(); Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java?rev=906614&r1=906613&r2=906614&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java (original) +++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestTypesafeCriteria.java Thu Feb 4 19:38:27 2010 @@ -1161,7 +1161,6 @@ executeAndCompareSQL(q, sql); } - @AllowFailure(message="The expected sql string is incorrect") public void testValues5() { String sql = "SELECT t0.name, t2.id, t2.label FROM CR_ITEM t0 " + "INNER JOIN CR_ITEM_photos t1 ON t0.id = t1.ITEM_ID " From commitsjmurphy@example.com Fri Feb 05 16:38:16 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 91354 invoked from network); 5 Feb 2010 16:38:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 5 Feb 2010 16:38:16 -0000 Received: (qmail 7543 invoked by uid 500); 5 Feb 2010 16:38:16 -0000 Delivered-To: jmurphy@example.com Received: (qmail 7480 invoked by uid 500); 5 Feb 2010 16:38:16 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 7471 invoked by uid 99); 5 Feb 2010 16:38:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2010 16:38:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2010 16:38:14 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B602523889EC; Fri, 5 Feb 2010 16:37:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r906993 - in /openjpa/trunk: openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/ openjpa-kernel/src/main/resources/org/apache/openjpa/ee/ openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/ openjpa-kernel/src/main/reso... Date: Fri, 05 Feb 2010 16:37:54 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> Author: mikedd Date: Fri Feb 5 16:37:54 2010 New Revision: 906993 URL: http://svn.apache.org/viewvc?rev=906993&view=rev Log: OPENJPA-1498. Minor message file improvements Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/ee/localizer.properties openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties?rev=906993&r1=906992&r2=906993&view=diff ============================================================================== --- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties (original) +++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties Fri Feb 5 16:37:54 2010 @@ -77,7 +77,7 @@ does not support native sequences. To tell the dictionary how to select \ sequence values, use:\n\ openjpa.jdbc.DBDictionary: NextSequenceQuery="SELECT NEXT VALUE \ - FOR '{0}"\n\ + FOR "{0}"\n\ Where the above string is replaced with the proper SQL for your database. invalid-seq-sql: No rows returned for sql "{0}". Check your configuration. insert-seq: Inserting row for this mapping into sequence table. @@ -121,7 +121,7 @@ prepared-query-not-cachable: Query "{0}" is not fit for caching. prepared-query-invalidate: Query "{0}" is invalidated and removed from cache. prepared-query-uncache: Query "{0}" is removed from cache {1}. -prepared-query-remove-pattern: Removing exclusion pattern "{0}" caused \ +prepared-query-remove-pattern: Removing exclusion pattern "{0}" caused \ query to be cacheable again. uparam-mismatch: Supplied user parameters "{1}" do not match expected \ parameters "{0}" for the prepared query "{2}". Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/ee/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/ee/localizer.properties?rev=906993&r1=906992&r2=906993&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/ee/localizer.properties (original) +++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/ee/localizer.properties Fri Feb 5 16:37:54 2010 @@ -18,14 +18,14 @@ tm-not-found: Could not perform automatic lookup of EJB container''s \ javax.transaction.TransactionManager implementation. Please ensure that \ you are running the application from within an EJB 1.1 compliant EJB \ - container, and then set the org.apache.openjpa.ManagedRuntime property to \ - the appropriate value to obtain the TransactionManager. + container, and then set the org.apache.openjpa.ManagedRuntime property to \ + the appropriate value to obtain the TransactionManager. expected-reference: Expected object to be of type Reference, but instead was \ "{0}". not-supported: This operation is not supported. was-unsupported-op: Unable to execute {0} on a WebSphere managed transaction. \ WebSphere does not support direct manipulation of managed transactions. -was-transaction-id-exception: Unable to determine identity of the current \ +was-transaction-id-exception: Unable to determine identity of the current \ WebSphere managed transaction. Please ensure that your are running the \ application from within WebSphere Application Server (version 5.0.2 or \ newer). @@ -33,7 +33,7 @@ interfaces. Please ensure that you are running the application from within \ WebSphere Application Server (version 5.0.2 or newer). was-lookup-error: An error occurred looking up the WebSphere extended JTA \ - service. Please ensure that you are running the application from within \ + service. Please ensure that you are running the application from within \ WebSphere Application Server (version 5.0.2 or newer). tm-unavailable: Unable to obtain a TransactionManager using {0}. tsr-cannot-suspend: The Transaction Synchronization Registry can not suspend \ @@ -41,4 +41,4 @@ exc-suspend-tran: A {0} exception occurred when trying to suspend the current \ transaction. exc-resume-tran: A {0} exception occurred when trying to resume the current \ - transaction. The transaction will be marked rollback only. \ No newline at end of file + transaction. The transaction will be marked rollback only. Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties?rev=906993&r1=906992&r2=906993&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties (original) +++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties Fri Feb 5 16:37:54 2010 @@ -93,7 +93,7 @@ factory-not-oidloader: Attempt to run the application id tool under metadata \ configuration that does not support it. The application id tool can only \ run under certain metadata factory settings. -str-cons: The id type "{0}" specified by persistent type "{1}" \ +str-cons: The id type "{0}" specified by persistent type "{1}" \ does not have a public {0}(String) or {0}(Class, String) constructor. appid-start: Generating an application id for type "{0}". appid-invalid: Type "{0}" does not have metadata, does not use application \ @@ -160,7 +160,7 @@ processed by the OpenJPA enhancer. If you are enhancing some of your \ persistent types, you must enhance all of them. subclasser-private-ctor: Unenhanced classes must have a public or protected \ - no-args constructor. Type {0}'s no-args constructor is private or \ + no-args constructor. Type {0}''s no-args constructor is private or \ package-visible. If you do not want to add such a constructor, you must \ run the OpenJPA enhancer after compilation, \ or deploy to an environment that supports deploy-time enhancement, such as \ @@ -175,9 +175,9 @@ report this problem to the OpenJPA team at jmurphy@example.com. subclasser-no-getter: No getter exists for field {0}. subclasser-no-setter: No setter exists for field {0}. -subclasser-invalid-getter: The getter for field {0} does not obey OpenJPA's \ +subclasser-invalid-getter: The getter for field {0} does not obey OpenJPA''s \ subclassing restrictions. Getters must return a single non-computed field. -subclasser-invalid-setter: The setter for field {0} does not obey OpenJPA's \ +subclasser-invalid-setter: The setter for field {0} does not obey OpenJPA''s \ subclassing restrictions. Setters must assign the passed-in parameter to a \ single field in the object. subclasser-private-accessors-unsupported: The accessor for field {1} in type \ Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties?rev=906993&r1=906992&r2=906993&view=diff ============================================================================== --- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties (original) +++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties Fri Feb 5 16:37:54 2010 @@ -443,7 +443,7 @@ fill-bean-error: Error while filling data with JavaBean strategy. The error \ occurred while invoking bean method "{0}" with input argument "{1}" of \ types "{2}". See nested exception for details. -fill-assign-error: Error while assigning data from values "{0}" of types \ +fill-assign-error: Error while assigning data from values "{0}" of types \ "{1}". See nested exception for details. fill-factory-error: Error while fill data with factory strategy. The error \ occurred while invoking "{0}" with key "{1}" and value "{2}" of type "{3}". \ Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties?rev=906993&r1=906992&r2=906993&view=diff ============================================================================== --- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties (original) +++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties Fri Feb 5 16:37:54 2010 @@ -207,7 +207,7 @@ for Criteria Query parameters. params-named-in-native: Can not set value for named parameter "{0}" \ because the executable query is created by a native query "{1}". \ - Use only 1-based positional parameter to set values \in native queries. + Use only 1-based positional parameter to set values in native queries. param-null-assignable: {0} can not be assigned to null. param-value-not-assignable: {0} can not be assigned to "{1}" of {2}. param-not-bound: {0} is not bound to any value. @@ -223,4 +223,4 @@ create-emf-error: Failed to create a provider for "{0}". invalid-version-attribute: Persistence version attribute value "{0}" is not valid. Using version "{1}" by default. not-jpql-or-criteria-query: Query is neither a JPQL SELECT nor a Criteria API query. -cache-retrieve-override: The setting of CacheRetrieveMode.USE is ignored and set to BYPASS for refresh operation. \ No newline at end of file +cache-retrieve-override: The setting of CacheRetrieveMode.USE is ignored and set to BYPASS for refresh operation. From commitsjmurphy@example.com Mon Feb 08 19:22:44 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 6056 invoked from network); 8 Feb 2010 19:22:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Feb 2010 19:22:44 -0000 Received: (qmail 99997 invoked by uid 500); 8 Feb 2010 19:22:44 -0000 Delivered-To: jmurphy@example.com Received: (qmail 99958 invoked by uid 500); 8 Feb 2010 19:22:44 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 99949 invoked by uid 99); 8 Feb 2010 19:22:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 19:22:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 19:22:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 98F9723889EB; Mon, 8 Feb 2010 19:22:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r907763 - in /openjpa/branches/1.3.x: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/... Date: Mon, 08 Feb 2010 19:22:13 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: mtylenda Date: Mon Feb 8 19:22:13 2010 New Revision: 907763 URL: http://svn.apache.org/viewvc?rev=907763&view=rev Log: OPENJPA-1367: Improvements for H2 database. Commit patch provided by Prashant Bhat with slight modifications. Information on CROSS JOIN provided by Thomas Mueller. Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestMultipleSchemaNames.java openjpa/branches/1.3.x/openjpa-project/src/doc/manual/supported_databases.xml Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java?rev=907763&r1=907762&r2=907763&view=diff ============================================================================== --- openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java (original) +++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/H2Dictionary.java Mon Feb 8 19:22:13 2010 @@ -18,10 +18,8 @@ */ package org.apache.openjpa.jdbc.sql; -import java.math.BigDecimal; import java.sql.Connection; import java.sql.DatabaseMetaData; -import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Types; import java.util.Arrays; @@ -36,7 +34,7 @@ import org.apache.openjpa.meta.JavaTypes; /** - * Support for the H2 database ({@link http://www.h2database.com}). + * Dictionary for H2 ({@link http://www.h2database.com}). * * @since 0.9.7 */ @@ -53,30 +51,19 @@ autoAssignTypeName = "INTEGER"; nextSequenceQuery = "CALL NEXT VALUE FOR {0}"; - // CROSS JOIN is currently not supported - crossJoinClause = "JOIN"; - requiresConditionForCrossJoin = true; stringLengthFunction = "LENGTH({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "TRIM({0})"; - useSchemaName = true; - supportsSelectForUpdate = true; supportsSelectStartIndex = true; supportsSelectEndIndex = true; rangePosition = RANGE_POST_LOCK; supportsDeferredConstraints = false; - blobTypeName = "BLOB"; - doubleTypeName = "DOUBLE"; - supportsNullTableForGetPrimaryKeys = true; supportsNullTableForGetIndexInfo = true; - requiresCastForMathFunctions = false; - requiresCastForComparisons = false; - reservedWordSet.addAll(Arrays.asList(new String[] { "CURRENT_TIMESTAMP", "CURRENT_TIME", "CURRENT_DATE", "CROSS", "DISTINCT", "EXCEPT", "EXISTS", "FROM", "FOR", "FALSE", "FULL", @@ -99,7 +86,9 @@ } public int getPreferredType(int type) { - return super.getPreferredType(type); + if(type == Types.BIT) + return Types.BOOLEAN; + return type; } public String[] getAddPrimaryKeySQL(PrimaryKey pk) { @@ -188,8 +177,11 @@ boolean subselect) { if (end != Long.MAX_VALUE) buf.append(" LIMIT ").appendValue(end - start); - if (start != 0) + if (start != 0) { + if(end == Long.MAX_VALUE) + buf.append(" LIMIT 0"); buf.append(" OFFSET ").appendValue(start); + } } public void indexOf(SQLBuffer buf, FilterValue str, FilterValue find, Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml?rev=907763&r1=907762&r2=907763&view=diff ============================================================================== --- openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml (original) +++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/sql-error-state-codes.xml Mon Feb 8 19:22:13 2010 @@ -91,7 +91,11 @@ </dictionary> <dictionary class="org.apache.openjpa.jdbc.sql.H2Dictionary"> - <referential-integrity>22003,22012,22025,23000,23001</referential-integrity> + <lock>HYT00</lock> + <referential-integrity>22003,22012,22025,23000,23002,23003</referential-integrity> + <object-exists>23001</object-exists> + <object-not-found>02000</object-not-found> + <optimistic></optimistic> </dictionary> <dictionary class="org.apache.openjpa.jdbc.sql.HSQLDictionary"> Modified: openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestMultipleSchemaNames.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestMultipleSchemaNames.java?rev=907763&r1=907762&r2=907763&view=diff ============================================================================== --- openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestMultipleSchemaNames.java (original) +++ openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestMultipleSchemaNames.java Mon Feb 8 19:22:13 2010 @@ -26,6 +26,7 @@ import org.apache.openjpa.jdbc.conf.JDBCConfiguration; import org.apache.openjpa.jdbc.sql.DBDictionary; +import org.apache.openjpa.jdbc.sql.H2Dictionary; import org.apache.openjpa.jdbc.sql.PostgresDictionary; import org.apache.openjpa.persistence.OpenJPAEntityManager; import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; @@ -398,7 +399,7 @@ } /** - * Create necessary schemas if running on PostgreSQL as it does + * Create necessary schemas if running on PostgreSQL or H2 as they do * not create them automatically. * Oracle and MySQL also don't create schemas automatically but * we give up as they treat schemas in special ways. @@ -409,7 +410,7 @@ DBDictionary dict = ((JDBCConfiguration) em.getConfiguration()) .getDBDictionaryInstance(); - if (!(dict instanceof PostgresDictionary)) { + if (!(dict instanceof PostgresDictionary || dict instanceof H2Dictionary)) { closeEMF(emf); return; } Modified: openjpa/branches/1.3.x/openjpa-project/src/doc/manual/supported_databases.xml URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-project/src/doc/manual/supported_databases.xml?rev=907763&r1=907762&r2=907763&view=diff ============================================================================== --- openjpa/branches/1.3.x/openjpa-project/src/doc/manual/supported_databases.xml (original) +++ openjpa/branches/1.3.x/openjpa-project/src/doc/manual/supported_databases.xml Mon Feb 8 19:22:13 2010 @@ -523,7 +523,7 @@ <itemizedlist> <listitem> <para> -H2 does not support cross joins +None </para> </listitem> </itemizedlist> From commitsjmurphy@example.com Mon Feb 08 22:33:04 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 80690 invoked from network); 8 Feb 2010 22:33:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Feb 2010 22:33:04 -0000 Received: (qmail 30054 invoked by uid 500); 8 Feb 2010 22:33:04 -0000 Delivered-To: jmurphy@example.com Received: (qmail 30006 invoked by uid 500); 8 Feb 2010 22:33:04 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 29997 invoked by uid 99); 8 Feb 2010 22:33:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 22:33:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 22:33:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7B2DE23889E3; Mon, 8 Feb 2010 22:32:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r907828 - /openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Date: Mon, 08 Feb 2010 22:32:41 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: mikedd Date: Mon Feb 8 22:32:40 2010 New Revision: 907828 URL: http://svn.apache.org/viewvc?rev=907828&view=rev Log: OPENJPA-1500 : Check lowercase inclusion/exclusion properties for DataCache. Submitted By: Rick Curtis Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=907828&r1=907827&r2=907828&view=diff ============================================================================== --- openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java (original) +++ openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Mon Feb 8 22:32:40 2010 @@ -2463,8 +2463,9 @@ */ public void setIsCacheable(boolean isCacheable, boolean annotationOverride) { Options dataCacheOptions = getDataCacheOptions(); - Set excludedTypes = extractDataCacheClassListing(dataCacheOptions.getProperty("ExcludedTypes", null)); - Set types = extractDataCacheClassListing(dataCacheOptions.getProperty("Types", null)); + Set excludedTypes = + extractDataCacheClassListing(dataCacheOptions.getProperty("ExcludedTypes", "excludedTypes", null)); + Set types = extractDataCacheClassListing(dataCacheOptions.getProperty("Types", "types", null)); String className = getDescribedType().getName(); if (excludedTypes != null && excludedTypes.contains(className)) { From commitsjmurphy@example.com Mon Feb 08 22:49:55 2010 Return-Path: <commitsjmurphy@example.com> Delivered-To: jmurphy@example.com Received: (qmail 89566 invoked from network); 8 Feb 2010 22:49:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Feb 2010 22:49:55 -0000 Received: (qmail 47693 invoked by uid 500); 8 Feb 2010 22:49:55 -0000 Delivered-To: jmurphy@example.com Received: (qmail 47629 invoked by uid 500); 8 Feb 2010 22:49:55 -0000 Mailing-List: contact jmurphy@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jmurphy@example.com> List-Unsubscribe: <mailto:jmurphy@example.com> List-Post: <mailto:jmurphy@example.com> List-Id: <commits.openjpa.apache.org> Reply-To: jmurphy@example.com Delivered-To: mailing list jmurphy@example.com Received: (qmail 47620 invoked by uid 99); 8 Feb 2010 22:49:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 22:49:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 22:49:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EB94F2388901; Mon, 8 Feb 2010 22:49:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r907835 - in /openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache: TestCacheExclusions.java TestCacheExclusionsLower.java TestCacheExclusionsUpper.java Date: Mon, 08 Feb 2010 22:49:33 -0000 To: jmurphy@example.com From: jmurphy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <jmurphy@example.com> Author: mikedd Date: Mon Feb 8 22:49:33 2010 New Revision: 907835 URL: http://svn.apache.org/viewvc?rev=907835&view=rev Log: OPENJPA-1500: Modify testcase to run twice with lower and uppercase values for included and excluded types. Added: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsLower.java (with props) openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusionsUpper.java (with props) Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java Modified: openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java?rev=907835&r1=907834&r2=907835&view=diff ============================================================================== --- openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java (original) +++ openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestCacheExclusions.java Mon Feb 8 22:49:33 2010 @@ -30,7 +30,7 @@ import org.apache.openjpa.persistence.StoreCache; import org.apache.openjpa.persistence.test.PersistenceTestCase; -public class TestCacheExclusions extends PersistenceTestCase {
{'source': 'Apache Software Foundation Public Mail Archives'}