[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-09-10 Thread neisann
Hi, Sorry the late reply but I was busy with other activities. I just discovered why my code wasn't working. I had created an Oracle before insert trigger for Person and Address table that used the sequences to insert the primary key value in the tables. I didn't realize that JBOSS invokes the

[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-08-15 Thread waynebaylor
yes, and in the example i provided in my previous post the entity manager does exactly that. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074594#4074594 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074594 _

[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-08-15 Thread neisann
Hi, I have a JSP page that receives the data entered by the user. This page uses JSF. * register.jsp: | <%@ page language="java" contentType="text/html; charset=ISO-8859-1" | pageEncoding="ISO-8859-1"%> | | <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %> | <%@ tagli

[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-08-14 Thread waynebaylor
i just put together this example which mirrors your entities, and i was able to save without FK errors. Entity Code: @Entity | @SequenceGenerator(name="child_seq", sequenceName="child_seq") | public class Child | { | | private Long id; | | private Parent parent;

[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-08-14 Thread neisann
Hi, I added the Column(name =?id?) annotation before the getId() method of Person and Address ejb but I?m getting the same error message about the foreign key violation. My Oracle tables have the following fields: * Person Name Type Nullable Default - ---

[jboss-user] [EJB 3.0] - Re: Foreign key error

2007-08-13 Thread waynebaylor
are you saving a person before the associated address is saved? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073743#4073743 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073743 __