Do you have uni-directional relationship? Only bi-directional is supported.


Thomas

-----Original Message-----
>From: Russell, Glenn [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 20, 2001 6:10 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev] Object Reloading Error
>
>I have just discovered a pattern.
>
>On the second execution of the read, it is only the objects immediately
>related to the User object that are loaded. The objects related to those
>loaded objects are the ones that are not loaded. Has anyone seen a similar
>problem?,
>
>Glenn.
>
>-----Original Message-----
>From: Russell, Glenn [mailto:[EMAIL PROTECTED]]
>Sent: 20 August 2001 11:41
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] Object Reloading Error
>
>
>Hey,
>
>I have a problem where two identical reads are producing different results
>and anonmalous behaviour: -
>
>         m_db = m_jdo.getDatabase();                    // Get the database
>         log( "Got handle to database" );
>
>         String _oql = "SELECT p FROM
>com.spirentsystems.applications.aura.modules.enterprise.domain.User p";
>
>         m_db.begin();                                  // Start a new
>transaction
>         m_query = m_db.getOQLQuery( _oql );
>         m_results = m_query.execute();
>         boolean entered = false;
>
>         while( m_results.hasMoreElements() ) {
>             User user = ( User ) m_results.next();
>             log( "User Id: " + user.getUserId() );
>
>         }
>
>
>         m_db.commit();
>         m_db.close();
>
>The first time this executes, everything is correct, but the second time I
>execute the above in the same session, practically none of the
relationships
>are loaded. But, if I do a commit the second time, Castor complains with: -
>
>org.exolab.castor.jdo.PersistenceException: Object,
>com.spirentsystems.applications.aura.modules.enterprise.domain.Division/130
0
>00000000000000000000000000,  isn't loaded in the persistence storage!
>        at
>org.exolab.castor.persist.ClassMolder.preStore(ClassMolder.java:1092)
>        at
>org.exolab.castor.persist.LockEngine.preStore(LockEngine.java:704)
>        at
>org.exolab.castor.persist.TransactionContext.prepare(TransactionContext.jav
a
>:1138)
>        at
>org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:498)
>        at
>com.spirentsystems.framework.persistence.tests.castortests.LazyLoad.UserTes
t
>(LazyLoad.java:169)
>        at
>com.spirentsystems.framework.persistence.tests.castortests.LazyLoad.main(La
z
>yLoad.java:192)
>
>Incidentally, the error above refers to an object that isn't loaded as it
>should be with the above query, so it seems Castor expects it to be there.
>The mapping file I am using can be viewed from
>http://www.openai.com/conf/tms_mapping_mark.xml.
>
>Glenn.
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-dev
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-dev
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to