Good morning all

I'm experiencing a rather interesting behaviour with castor 0.9.6. Here is the scenario: I have companies, products, and components. A company may have one or more products, and a product may consist of one or more components.

The scenario plays out like this:
Create a company (ACME inc)- this works fine
Create a product (Product X)- this also works fine
Create Component A - no problem
Create Component B - no problem.
Add Component A and Component B to the above product - No problem.

Create another Product (Product Y)
Create Component C - no problem.
Add Component C to Product Y - no problem
Add Component B to Product Y - problem!

When I recursively update everything in a single transaction, in the order component, product, and then company, Castor deletes the link that Component B has with Product X, and rewrites it to point to Product Y. Component C is correct for now, until it is referenced by another product, at which point Castor will delete the link it has with Product Y, and rewrite it to point to whatever new product it is meant to be referencing. This only ever happens to product definitions created within the same Company.

All of the objects are related, as opposed to dependent, and are linked in both directions. I have tried setting setAutoStore to 'true', and just saving the Company object. This results in a *DuplicateIdentityException* when I have the same component linked to more than one product.


Any suggestions of where I can start looking?

Many thanks
Sean









-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to