Hi,
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)
| @JoinColumn(name="Planet_idPlanet")
| 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();
| planet.getBuildingsProdList().add(b);
| em.merge(planet);
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?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100099#4100099
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100099
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user