0 Replies Latest reply on Mar 8, 2007 9:33 AM by lisaanm

    Newbie: why em.persist() not writing (flush) to DB until ano

    lisaanm

      Hi.,
      May a silly question but i'm new to Seam.

      I have a Seam CRUD application with very limited annotations (left to default in most cases). Problem with Entity beans (EB with only @Entitiy annotation).
      I'm using a plain POJO and wrapping Entity Bean like this


      In StateSessionBean:
      WorkOnEntityBean workOnEntityBean = new WorkOnEntityBean(new SeamEntityBean());

      and then using this workOnEntityBean on XTHML page like StateSessionBean.workOnEntityBean.seamEntityBean.someField

      now user clicks a save action method

      where
      em.persist(StateSessionBean.workOnEntityBean.seamEntityBean);

      Now I could see only some select statements (some sequence stms.) in my console and no INSERT/UPDATE.

      But then after render/response phase, on other page if i click someother action method (of same bean) then I could see INSERT/UPDATE statements.

      I don't know why its happening. I think i'm missing something.

      Any help would be highly appreciated.

      Thanks
      Lisa