Hi

Same scenarion Product and ProductGroup example. Creation and lookup is
working fine now (all I needed to do was to load ProductGroup in the same
transaction as the one used to create the Product).

Now I am testing long transaction support.

When I assign a new ProductGroup to the product and call update(), Castor
reports:

23.10,11:09:04,954 ERROR [CastorJDOImpl] -
org.exolab.castor.jdo.PersistenceException: Object, myapp.Product@74b0dc,
links to
another object, myapp.ProductGroup@771dc that is not loaded/updated/created
in this transaction.

>From the source, it writes:

                        // yip: user're pretty easily to run into cache
                        // integrity problem here, if user forgot to create
                        // "value" explicitly. Let's put error message here
                        if ( value != null && !tx.isRecorded( value ) )
                            throw new PersistenceException(
                            "Object, "+object+", links to another object,
"+value
                            +" that is not loaded/updated/created in this
transaction");


This is true because the original ProductGroup was created a while ago in
another transaction. It's kept in cache, so it's impossible to update that
attribute in a long transaction.

Is this the expected behavior?

Keith C

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

Reply via email to