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/1300
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.java
:1138)
        at
org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:498)
        at
com.spirentsystems.framework.persistence.tests.castortests.LazyLoad.UserTest
(LazyLoad.java:169)
        at
com.spirentsystems.framework.persistence.tests.castortests.LazyLoad.main(Laz
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

Reply via email to