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 :
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
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 :