Re: [appfuse-user] SQL does not store FK when implementing OneToMany relationship.

2008-07-20 Thread Alc4man
Thanks for the quick reply. I tried to add mappedBy="category" as you said but it did not help. Now it looks like: @OneToMany( cascade = {CascadeType.ALL}, fetch = FetchType.EAGER, mappedBy = "category" ) -- Al Try telling hibernate of the bidirection in the Category source you have to ad

Re: [appfuse-user] SQL does not store FK when implementing OneToMany relationship.

2008-07-20 Thread J. David Mendoza
Try telling hibernate of the bidirection in the Category source you have to add mappedBy="category", like this: @OneToMany( cascade = {CascadeType.ALL}, fetch = FetchType.EAGER, *mappedBy="category"* ) @JoinColumn(name="category_id" > > ) > public List items = new ArrayList(); David M. 2008/

[appfuse-user] SQL does not store FK when implementing OneToMany relationship.

2008-07-20 Thread Alc4man
Hello. Just started using appfuse and created the models Category and Item. When I try to test the creation of items in my CategoryDaoTest I get the following error: could not insert: [Item]; uncategorized SQLException for SQL [insert into item (amount, created_date, last_edited) values (?, ?, ?