0 Replies Latest reply on Jul 31, 2006 4:22 PM by angelogalvao

    Master detail , conversation....

    angelogalvao

      That's something that i'm not understanding about seam, conversation etc...


      I have 2 entity beans, for example, with a OnetoMany relationship:

      Client and Products:


      Client{
      ....
      private Set products;
      ....
      }



      and in my Session bean i got to methods:

      @Name("clientManager")
      @Stateful
      public ClientManagerBean implements ClientManager{
      ...

      @In(required=false)
      private Client client;

      @In(required=false)
      private Product product;

      public void addClient(){
      entityManager.persist(client);
      }

      public void addProductToClient(){
      client.addProduct(product); // add to the set
      }
      ....
      }



      in the method addProductToClient i just put the product in the collection, but in the next submit the product it's not there anymore...


      I think this is the reason to the conversation state...

      What i dont understand, what i have to do?


      thanks!!!