[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2175) EJB 3.0 on tomcat and jboss embedderd don't save FK keys

Stateless Bean (JIRA) jira-events at lists.jboss.org
Mon Oct 29 03:34:01 EDT 2007


EJB 3.0 on tomcat and jboss embedderd don't save FK keys
--------------------------------------------------------

                 Key: JBSEAM-2175
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2175
             Project: JBoss Seam
          Issue Type: Task
          Components: EJB3
    Affects Versions: 2.0.0.CR2
         Environment: JBoss 4.0.5, tomcat 6, JDK 5 & 6
            Reporter: Stateless Bean
             Fix For: 2.0.0.GA


I got collection mapped (one directional) from planet->buildingsProd class like this

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

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

and add new object to collection
Code:		
BuildingsProd b = new BuildingsProd();
planet.getBuildingsProdList().add(b);
em.merge(planet);

new object should me inserted into db with my planet FK key, but new object is inserted but without FK.
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!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list