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
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
_
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
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;
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
- ---
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
__