[jboss-user] [EJB 3.0] - Re: Using a JoinTable, getting unique constraint violtions

2007-02-16 Thread fhh
This is not a one-to-many relationship but a (unidirectional) many-to-many. (One product belongs to many invoices, many invoices belong to one one product). Regards Felix View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4017526#4017526 Reply to the post :

[jboss-user] [EJB 3.0] - Re: Using a JoinTable, getting unique constraint violtions

2007-02-14 Thread SmokingAPipe
I figured out the problem, but not the solution. Here's the problem: I have a uni-directional Collection in my Invoice: @Entity class Invoice { | |@OneToMany CollectionProduct getProducts(); | | } This results in creating a join table, with a unique constraint on the product_id

[jboss-user] [EJB 3.0] - Re: Using a JoinTable, getting unique constraint violtions

2007-02-14 Thread SmokingAPipe
I ended up creating a placeholder entity. If that's the only way to do this, that's an unfortunate defect in the EJB3 spec. If there is some way please let me know. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016724#4016724 Reply to the post :