[appfuse-user] Test for entity exists exception always fails

2008-08-02 Thread Alc4man
Hiya. When I run my ItemExistsExceptionTest it never fails like it's supposed to, even though it's very similar to the UserExistsExceptionTest. When I try to persist my entity, hibernate will store the same entity even though it already exists and newItem.equals(persistedItem) returns true. So

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

[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 (?, ?, ?