Hi

I have problem. Im new to EJB and I'm testing it. I'm using JBoss 
4.0.4.GA-Patch1.
I use following annotation to define relationship:

@OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER, optional=false)
@JoinColumn(name="firm_id", unique=true, nullable=false)
public Firm getFirm() {
        return this.firm;
}

It works fine, but it generates such constraint under PostgreSQL 8.1 (no matter 
what CascadeType I use):

CONSTRAINT fk6a68e0840801796 FOREIGN KEY (firm_id)
REFERENCES firms (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

I'd like:
ON DELETE CASCADE

Am I doing something wrong?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962776#3962776

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962776
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to