Hi all,

I have the following Situation: 

I have two classes Product and ProductGroup each with corresponding
mapping to database tables. Product has a link to some ProductGroup.
Let's say ProductGroup is some kind of a catalog and my application
provides a cache-proxy for this catalog. I now want to retrieve a
certain product and set a new ProductGroup:

>>>
db.begin();

Product p = (Product)db.load(Product.class, existingIdentity);
p.setProductGroup(someAlreadyLoadedProductGroupCacheProxy.getProductGrou
p("TestGroup"));

db.commit();
db.close();
<<<


This will fail with the above Exception. Do I have to load every Object
which I will link to from the object I manipulate in the same
transaction? If so, that sounds weird, because all castor has to do is
trying to insert the foreign key.

Can anyone please help?

Thanks in advance.

Enrico

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

Reply via email to