-
1. Re: Problem with @VersionsJoinTable
adamw Feb 6, 2009 2:19 PM (in response to gonzaloferreyra)Hello,
your mapping is wrong. @VersionsJoinTable only has sense when you have a unidirectional one-to-many or many-to-many mapping. In your case, the mapping is bidirectional, and no additional join table is necessary.
Also, the exception isn't too informative, it's missing the most important part - where it actually happened :)
--
Adam -
2. Re: Problem with @VersionsJoinTable
gonzaloferreyra Feb 9, 2009 6:59 AM (in response to gonzaloferreyra)Thanks a lot Adam, i really misunderstood it. The problem was solved deleting that annotation, but I yet got a doubt:
If I insert two registers into the database via sql, one instance of Comitente, and the other instance of SedeComitente, for example, and then I try to add the instance of SedeComitente to the collection programatically, I should fill via sql the audit tables too?
That issue it's stopping me to continue the developing of the test cases for the EJB module, that's why I'm asking it again :(.
Thanks again.
Gonzalo -
3. Re: Problem with @VersionsJoinTable
adamw Feb 10, 2009 2:15 AM (in response to gonzaloferreyra)Hello,
if you add some data not with Hibernate, then if you want the history-reading to work properly, you should also add the data to the audit tables.
--
Adam -
4. Re: Problem with @VersionsJoinTable
gonzaloferreyra Feb 10, 2009 6:10 AM (in response to gonzaloferreyra)Thanks again Adam, I'll do it this way.
Thanks a lot
Gonzalo