2 Replies Latest reply on Sep 6, 2002 4:45 PM by Dain Sundstrom

    transaction problem - i think i got it wrong

    Fabricio Newbie

      i have a session bean which creates an instance of a CMP entity bean. I turns out that this entity bean (Purchase) is related to 2 other entity beans.


      my session bean does:

      1 - LocalPurchase purchase = purchasehome.create(bla bla);
      2 - purchase.setCompany(company);
      3 - purchase.setEmployee(employee);

      Everything has REQUIRED set as transaction attribute.
      The problem is that the session method i use to create the entity bean returns before relating the purchase to the Company and Employee!

      When i look into the database, the cod_company and cod_employee fields are set to NULL. any ideas???? thanks in advance!