3 Replies Latest reply on Oct 28, 2007 8:44 AM by Stateless Bean

    Strange behaviour on seam 2 and tomcat 6

    Stateless Bean Novice

      Can anyone explain me what is going one?
      I got collection mapped (one directional) from planet->buildingsProd class like this

      @OrderBy("index ASC")
      @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
      public List<BuildingsProd> getBuildingsProdList() {
       if (buildingsProdList == null)
       buildingsProdList = new LinkedList<BuildingsProd>();
       return buildingsProdList;

      and when I load my planet
      Planet planet = em.find(Planet.class, idPlanet);

      and add new object to collection

      BuildingsProd b = new BuildingsProd();

      new object should me inserted into db with my planet key and here is my question.
      This works fine on JBoss 4.0.5 but on tomcat with jboss embedded new object is inserted into db but withoud planet FK key!!!
      Why, and what is wrong here?