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

Reply via email to