Henning,

can you please post the relevant information (mapping file, Java entities, etc.) so 
that we can help you with your problem. In general, I cannot see a 
problem with your code, but let's wait and see what you share with us.

Regards
Werner

On Wed, 23 Jun 2004 20:03:48 +0200, Henning Voss wrote:

>
>hi,
>
>i am having trouble with long transactions and many-to-many relationsships.
>i am using castor 0.9.5.3 and the example application against mysql and
>oracle. in the example application there is a many to many relationship
>between products and categories.
>
>sample1:
>db.begin();
>Product p = (Product)db.load(Product.class, new Integer(44));
>Category c = (Category)db.load(Category.class, new Integer(6));
>p.addCategories(c);
>db.commit();
>
>sample1 runs perferctly ok, a new record is inserted into the many-to-many
>table.
>
>sample2:
>db.begin();
>Product p = (Product)db.load(Product.class, new Integer(44));
>Category c = (Category)db.load(Category.class, new Integer(6));
>db.commit();
>
>p.addCategories(c);
>
>db.begin();
>db.update(p);
>db.commit();
>
>sample2 does not report any errors but no new record is inserted into the
>many-to-many table.
>
>
>can someone please expain why the second sample does not work ?
>
>Thanks,
>Henning
>
>
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-user
>



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

Reply via email to