db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <bri...@apache.org>
Subject Re: OTM CollectionProxy Bug =(
Date Mon, 05 Apr 2004 19:42:02 GMT
Follow that up by changing the refs to the interface so that it *can*  
proxy =)

otm-dependent objects are deleted =(

-Brian

Patch to replicate bug:

Index: src/test/org/apache/ojb/repository_junit_otm.xml
===================================================================
RCS file:  
/home/cvs/db-ojb/src/test/org/apache/ojb/repository_junit_otm.xml,v
retrieving revision 1.5
diff -u -r1.5 repository_junit_otm.xml
--- src/test/org/apache/ojb/repository_junit_otm.xml	5 Apr 2004  
13:58:59 -0000	1.5
+++ src/test/org/apache/ojb/repository_junit_otm.xml	5 Apr 2004  
19:41:00 -0000
@@ -58,6 +58,7 @@
       element-class-ref="org.apache.ojb.otm.AddressDesc"
        
collection- 
class="org.apache.ojb.broker.util.collections.ManageableArrayList"
       otm-dependent="true"
+     proxy="true"
    >
       <inverse-foreignkey field-ref="personId"/>
    </collection-descriptor>
Index: src/test/org/apache/ojb/otm/Person.java
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/otm/Person.java,v
retrieving revision 1.3
diff -u -r1.3 Person.java
--- src/test/org/apache/ojb/otm/Person.java	5 Apr 2004 12:16:25  
-0000	1.3
+++ src/test/org/apache/ojb/otm/Person.java	5 Apr 2004 19:41:00 -0000
@@ -16,6 +16,7 @@
   */

  import java.util.ArrayList;
+import java.util.List;
  import java.io.Serializable;

  public class Person implements Serializable
@@ -26,7 +27,7 @@
      private String lastname;
      private Integer mainAddressId;
      private Address mainAddress;
-    private ArrayList otherAddresses;
+    private List otherAddresses;

      public Person()
      {
@@ -88,7 +89,7 @@
          this.mainAddress = mainAddress;
      }

-    public ArrayList getOtherAddresses()
+    public List getOtherAddresses()
      {
          return otherAddresses;
      }



On Apr 5, 2004, at 3:31 PM, Brian McCallister wrote:

> On the otm-dependent="true" collections, in the otm unit test  
> mappings, add a proxy="true" and bad things start happening =( (ie,  
> dependent tests all fail).
>
> I took a stab at it but the solution wasn't obvious. Oleg, any  
> insights? This is a bit of a big problem for me at the moment.
>
> -Brian
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message