db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerImpl.java
Date Fri, 22 Apr 2005 17:12:36 GMT
arminw      2005/04/22 10:12:36

  Modified:    src/java/org/apache/ojb/broker/core Tag: OJB_1_0_RELEASE
                        PersistenceBrokerImpl.java
  Log:
  take care of objects using 'super-table' strategy
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.83.2.17 +8 -2      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.83.2.16
  retrieving revision 1.83.2.17
  diff -u -r1.83.2.16 -r1.83.2.17
  --- PersistenceBrokerImpl.java	20 Apr 2005 16:41:21 -0000	1.83.2.16
  +++ PersistenceBrokerImpl.java	22 Apr 2005 17:12:36 -0000	1.83.2.17
  @@ -892,7 +892,13 @@
           Object ref = rds.getPersistentField().get(obj);
           if (!onlyLink && rds.getCascadingStore() == ObjectReferenceDescriptor.CASCADE_OBJECT)
           {
  -            store(ref);
  +            if(rds.isSuperReferenceDescriptor())
  +            {
  +                ClassDescriptor superCld = getDescriptorRepository().getDescriptorFor(rds.getClassDescriptor().getBaseClass());
  +                Identity oid = serviceIdentity().buildIdentity(superCld, obj);
  +                storeToDb(obj, superCld, oid, insert);
  +            }
  +            else store(ref);
           }
           else
           {
  
  
  

---------------------------------------------------------------------
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