Jakob Braeuchi | 1 Jan 11:34 2004
Picon
Picon

Re: 1.0 release date

hi thomas,

first of all: i wish you a :) 2004.

i did some tests with sapdb. there's one testcase that is not supported 
by sapdb (QueryTest#testSubQuery4).

sapdb needs the syntax COLUMN OPERATOR SUBQUERY as in the folloing 
sample form their website:

SELECT name, city FROM hotel X, room
WHERE X.hno = room.hno AND room.roomtype = 'SINGLE'
	AND room.price < (SELECT AVG(room.price) FROM hotel, room
		WHERE hotel.hno = room.hno AND hotel.city = X.city
		AND room.roomtype = 'SINGLE' )

this case is covered by QueryTest#testSubQuery3 and works as expected.

the slightly different syntax SUBQUERY OPERATOR COLUMN

SELECT name, city FROM hotel X, room
WHERE X.hno = room.hno AND room.roomtype = 'SINGLE'
	AND (SELECT AVG(room.price) FROM hotel, room
		WHERE hotel.hno = room.hno AND hotel.city = X.city
		AND room.roomtype = 'SINGLE' ) > room.price

results in an sql-error -7056 subquery not allowed.

jakob

(Continue reading)

tomdz | 1 Jan 11:57 2004
Picon

cvs commit: db-ojb/xdocs xdoclet-module.xml

tomdz       2004/01/01 02:57:12

  Modified:    xdocs    xdoclet-module.xml
  Log:
  The dtdUrl option of the torque sub task is now described.

  Revision  Changes    Path
  1.6       +4 -0      db-ojb/xdocs/xdoclet-module.xml

  Index: xdoclet-module.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/xdoclet-module.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- xdoclet-module.xml	26 Dec 2003 20:19:46 -0000	1.5
  +++ xdoclet-module.xml	1 Jan 2004 10:57:12 -0000	1.6
   <at>  <at>  -128,6 +128,10  <at>  <at> 
               <dd>This attribute gives the name of the database for torque (required).</dd><br/>
               <dt><b>destinationFile</b></dt>
               <dd>The output file, default is <code>project_schema.xml</code>.</dd><br/>
  +            <dt><b>dtdUrl</b></dt>
  +            <dd>Allows to specify the url of the torque dtd. This is necessary e.g. for XML parsers that have
  +                problems with the default dtd url (http://jakarta.apache.org/turbine/dtd/database.dtd), or
  +                when using a newer version of torque.</dd>
               <dt><b>verbose</b></dt>
               <dd>Whether the task outputs some progress information. Default is <code>false</code>.</dd>
           </dl>
Jakob Braeuchi | 1 Jan 16:32 2004
Picon
Picon

Re: 1.0 release date

hi thomas,

the new version 7.5 of sapdb/maxdb no longer fails on 
QueryTest#testSubQuery4 :)

jakob

Jakob Braeuchi wrote:
> hi thomas,
> 
> first of all: i wish you a :) 2004.
> 
> i did some tests with sapdb. there's one testcase that is not supported 
> by sapdb (QueryTest#testSubQuery4).
> 
> sapdb needs the syntax COLUMN OPERATOR SUBQUERY as in the folloing 
> sample form their website:
> 
> SELECT name, city FROM hotel X, room
> WHERE X.hno = room.hno AND room.roomtype = 'SINGLE'
>     AND room.price < (SELECT AVG(room.price) FROM hotel, room
>         WHERE hotel.hno = room.hno AND hotel.city = X.city
>         AND room.roomtype = 'SINGLE' )
> 
> this case is covered by QueryTest#testSubQuery3 and works as expected.
> 
> 
> the slightly different syntax SUBQUERY OPERATOR COLUMN
> 
> SELECT name, city FROM hotel X, room
(Continue reading)

Andy Malakov | 2 Jan 16:44 2004

Assertion in org.apache.ojb.broker.accesslayer.ReferencePrefetcher

Hello All,

Is it possible to add an assertion into the method 

ReferencePrefetcher.associateBatched(Collection owners, Collection children)

that will validate that all parent objects that have non-null children foreign keys found their children?

        for (Iterator it = owners.iterator(); it.hasNext(); )
        {
            owner = it.next();
            fkValues = ord.getForeignKeyValues(owner,cld);
            if (isNull(fkValues))
            {
                field.set(owner, null);
                continue;
            }
            id = new Identity(null, topLevelClass, fkValues);
+           boolean childFound = false;
            for (Iterator it2 = children.iterator(); it2.hasNext(); )
            {
                relatedObject = it2.next();
                id2 = new Identity(relatedObject, pb);
                if (id.equals(id2))
                {
                    field.set(owner, relatedObject);
 +                  childFound = true;
                    break;
                }
            }
(Continue reading)

Armin Waibel | 2 Jan 16:52 2004
Picon

Re: Assertion in org.apache.ojb.broker.accesslayer.ReferencePrefetcher

Hi Andy,

by the way, are you working on a IdentityWeakHashMap implementation 
based on commons-collection ReferenceMap?
I'm too busy to write this code.
I will check in a workaround for the AnomymousField-Identity problem 
using an Identity wrapper today.

regards,
Armin

Andy Malakov wrote:
> Hello All,
> 
> Is it possible to add an assertion into the method 
> 
> ReferencePrefetcher.associateBatched(Collection owners, Collection children)
> 
> that will validate that all parent objects that have non-null children foreign keys found their children?
> 
> 
>         for (Iterator it = owners.iterator(); it.hasNext(); )
>         {
>             owner = it.next();
>             fkValues = ord.getForeignKeyValues(owner,cld);
>             if (isNull(fkValues))
>             {
>                 field.set(owner, null);
>                 continue;
>             }
(Continue reading)

Thomas Dudziak | 2 Jan 19:42 2004
Picon

Update to HSQLDB 1.7.2 RC1 for 1.0 final ?

Hi,

today I tested some things with Hsqldb (instead of my usual MySql), and
found some problems with the version that is part of OJB:

The syntax

CREATE TABLE SOMETABLE ( ID integer IDENTITY, ATTR VARCHAR(32), PRIMARY
KEY(ID)) 

does not work (btw. this is the form that Torque and therefore the XDoclet
OJB module generates) because the old Hsqldb version assumes that two
primary keys are being generated via IDENTITY and PRIMARY KEY (though it
is the same field). This is an old bug that I submitted some months ago
to the Hsqldb team, and that is fixed in the new Hsqldb version.

The second thing is that it is not possible to use long/Long fields (that
map to BIGINT) as primarykeys with the old Hsqldb version. See the
changelog at 
http://cvs.sourceforge.net/viewcvs.py/hsqldb/hsqldb-dev/doc/changelog_1_7_2.txt
for details.

So basically I hereby vote for updating to the 1.7.2RC1 version of Hsqldb
which is a release officially advertised on the Hsqldb site, prior to
releasing the OJB 1.0 final. This hopefully amounts to only rerunning the
tests; I'll try that today and post any results later on.

Tom
Andy Malakov | 3 Jan 01:13 2004

Re: Assertion in org.apache.ojb.broker.accesslayer.ReferencePrefetcher

I haven't yet started but I will. After briefly looking at ReferenceMap I realized that much code still have
to be duplicated unless
we request API change.

----- Original Message ----- 
From: "Armin Waibel" <armin <at> code-au-lait.de>
To: "OJB Developers List" <ojb-dev <at> db.apache.org>
Sent: Friday, January 02, 2004 10:52 AM
Subject: Re: Assertion in org.apache.ojb.broker.accesslayer.ReferencePrefetcher

> Hi Andy,
>
> by the way, are you working on a IdentityWeakHashMap implementation
> based on commons-collection ReferenceMap?
> I'm too busy to write this code.
> I will check in a workaround for the AnomymousField-Identity problem
> using an Identity wrapper today.
>
arminw | 3 Jan 03:06 2004
Picon

cvs commit: db-ojb/src/test/org/apache/ojb/odmg ODMGRollbackTest.java OdmgExamples.java DListTest.java CollectionsTest.java

arminw      2004/01/02 18:06:30

  Modified:    src/test/org/apache/ojb/odmg ODMGRollbackTest.java
                        OdmgExamples.java DListTest.java
                        CollectionsTest.java
  Log:
  add new odmg test cases

  Revision  Changes    Path
  1.17      +39 -0     db-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java

  Index: ODMGRollbackTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ODMGRollbackTest.java	16 Oct 2003 16:57:39 -0000	1.16
  +++ ODMGRollbackTest.java	3 Jan 2004 02:06:30 -0000	1.17
   <at>  <at>  -13,6 +13,8  <at>  <at> 
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
  +import org.apache.ojb.broker.query.QueryFactory;
  +import org.apache.ojb.broker.query.QueryByIdentity;
   import org.odmg.Database;
   import org.odmg.Implementation;
   import org.odmg.OQLQuery;
   <at>  <at>  -29,6 +31,43  <at>  <at> 
       public ODMGRollbackTest(String s)
(Continue reading)

arminw | 3 Jan 03:09 2004
Picon

cvs commit: db-ojb/src/test/org/apache/ojb/broker MtoNMapping.java

arminw      2004/01/02 18:09:31

  Modified:    src/test/org/apache/ojb/broker/metadata MetadataTest.java
               src/test/org/apache/ojb/broker MtoNMapping.java
  Log:
  add new PB-api/kernel test cases

  Revision  Changes    Path
  1.15      +11 -0     db-ojb/src/test/org/apache/ojb/broker/metadata/MetadataTest.java

  Index: MetadataTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/MetadataTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- MetadataTest.java	19 Dec 2003 16:34:32 -0000	1.14
  +++ MetadataTest.java	3 Jan 2004 02:09:31 -0000	1.15
   <at>  <at>  -64,6 +64,17  <at>  <at> 
           }
       }

  +    public void testFindFirstConcreteClassDescriptor()
  +    {
  +        DescriptorRepository dr = MetadataManager.getInstance().getRepository();
  +        ClassDescriptor cld = dr.getDescriptorFor(Repository.SMInterface.class);
  +        ClassDescriptor firstConcrete = dr.findFirstConcreteClass(cld);
  +        assertFalse(firstConcrete.isInterface());
  +        assertFalse(firstConcrete.isAbstract());
  +        firstConcrete = dr.findFirstConcreteClass(cld);
(Continue reading)

arminw | 3 Jan 03:17 2004
Picon

cvs commit: db-ojb/src/test/org/apache/ojb/odmg ODMGRollbackTest.java

arminw      2004/01/02 18:17:01

  Modified:    src/test/org/apache/ojb/odmg ODMGRollbackTest.java
  Log:
  add new test case

  Revision  Changes    Path
  1.18      +22 -0     db-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java

  Index: ODMGRollbackTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ODMGRollbackTest.java	3 Jan 2004 02:06:30 -0000	1.17
  +++ ODMGRollbackTest.java	3 Jan 2004 02:17:01 -0000	1.18
   <at>  <at>  -19,6 +19,7  <at>  <at> 
   import org.odmg.Implementation;
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
  +import org.odmg.ODMGException;

   /**
    * Do some rollback tests and check behavior within transactions.
   <at>  <at>  -31,6 +32,27  <at>  <at> 
       public ODMGRollbackTest(String s)
       {
           super(s);
  +    }
(Continue reading)


Gmane